Zsh doesn't have $HISTFILE set by default, but its startup wizard sets it to $HOME/.zsh_history. Thus, default it to $HOME/.zsh_history since we're not loading any startup files. Someone could set $HISTFILE to something else, but for now I don't want to load any RC files.
Both $HISTFILE and $HISTSIZE must be set, otherwise fc only prints commands from the present session. Set $HISTSIZE to something huge so it gets all of the entries, then load the history events with fc -R.
Remove the --no-globalrcs --no-rcs flag so that Zsh knows about custom $HISTFILE settings. However, this also means that (at least on my machine) Zsh puts the path to the Homebrew-installed most-used-exe first, and so it doesn't see the local most-used-exe. So, just copy
over the commands from most-used-zsh to run-zsh. It's not very DRY, but it's guaranteed to work.
Zsh doesn't have
$HISTFILE
set by default, but its startup wizard sets it to$HOME/.zsh_history
. Thus, default it to$HOME/.zsh_history
since we're not loading any startup files. Someone could set$HISTFILE
to something else, but for now I don't want to load any RC files.Both
$HISTFILE
and$HISTSIZE
must be set, otherwisefc
only prints commands from the present session. Set$HISTSIZE
to something huge so it gets all of the entries, then load the history events withfc -R
.Remove the
--no-globalrcs --no-rcs
flag so that Zsh knows about custom$HISTFILE
settings. However, this also means that (at least on my machine) Zsh puts the path to the Homebrew-installedmost-used-exe
first, and so it doesn't see the localmost-used-exe
. So, just copy over the commands frommost-used-zsh
torun-zsh
. It's not very DRY, but it's guaranteed to work.