[zsh] Fix up init functions
- Use autoload +X in do_init_functions - Properly redirect stdout and stderr in do_init_functions and init_env_vi so they don't print anything
This commit is contained in:
parent
4b2cef086f
commit
11ce2cd5c7
2 changed files with 3 additions and 3 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
# Eryn Wells <eryn@erynwells.me>
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
for func in ${(P)${1}}; do
|
for func in ${(P)${1}}; do
|
||||||
if autoload -Uz $func >& -; then
|
if autoload +X -Uz $func &> /dev/null; then
|
||||||
$func
|
$func
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,10 @@
|
||||||
|
|
||||||
# Prefer nvim and vim, in that order, over standard vi, which is insufferable.
|
# Prefer nvim and vim, in that order, over standard vi, which is insufferable.
|
||||||
|
|
||||||
if whence -cp nvim >& -; then
|
if whence -cp nvim &> /dev/null; then
|
||||||
alias vi=nvim
|
alias vi=nvim
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
elif whence -cp vim >& -; then
|
elif whence -cp vim &> /dev/null; then
|
||||||
alias vi=vim
|
alias vi=vim
|
||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue