web-dev-qa-db-ja.com

`Sudo netctl edit`のエディターを指定する方法は?

~ $ 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
2
srghma

visudoと

Defaults env_keep += "EDITOR"

指摘してくれた佐藤桂に感謝します

1
srghma