~ $ echo $EDITOR
/usr/bin/kak
~ $ sudo echo $EDITOR
/usr/bin/kak
~ $ su
Password:
/home/myusername $ echo $EDITOR
/usr/bin/kak
/home/myusername $ cat ~/.profile
# nvim editor config
# export EDITOR='/usr/bin/nvim'
# kakoune editor config
export EDITOR='/usr/bin/kak'
export PAGER=$HOME/.bin/kakpager
export MANPAGER=$HOME/.bin/kakmanpager
/home/myusername cat ~/.zshenv
# nvim editor config
# export EDITOR='/usr/bin/nvim'
# kakoune editor config
export EDITOR='/usr/bin/kak'
export PAGER=$HOME/.bin/kakpager
export MANPAGER=$HOME/.bin/kakmanpager
...
/home/myusername $
but it still nano
답변1
비수도와
Defaults env_keep += "EDITOR"
지적해주신 Sato Katsura에게 감사드립니다.