[zsh+nvim] fix sudoedit detection

This commit is contained in:
Dmytro Meleshko 2021-05-09 10:55:05 +03:00
parent c461a7443a
commit b1566353e5
2 changed files with 7 additions and 1 deletions

View File

@ -87,7 +87,6 @@ alias e="$EDITOR"
if [[ "$EDITOR" == *vim ]]; then
alias es="e -S"
fi
alias sue="sudo --edit"
alias rsync-backup='rsync --archive --compress --verbose --human-readable --partial --progress'

View File

@ -95,3 +95,10 @@ unset date_formats
if (( _is_linux )) && command_exists swapoff && command_exists swapon; then
deswap() { sudo sh -c 'swapoff --all && swapon --all'; }
fi
# Taken from <https://vi.stackexchange.com/a/7810/34615>
sudoedit() {
SUDO_COMMAND="sudoedit $@" command sudoedit "$@"
}
alias sudoe="sudoedit"
alias sue="sudoedit"