mirror of
https://github.com/jarun/nnn.git
synced 2024-11-10 13:23:12 +00:00
Change command order
This commit is contained in:
parent
22454d6893
commit
38de6efd48
|
@ -12,10 +12,10 @@ is_cmd_exists () {
|
||||||
echo $?
|
echo $?
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$(is_cmd_exists sudoedit)" -eq "0" ]; then
|
if [ "$(is_cmd_exists sudo)" -eq "0" ]; then
|
||||||
sudoedit "$1"
|
|
||||||
elif [ "$(is_cmd_exists sudo)" -eq "0" ]; then
|
|
||||||
sudo "$EDITOR" "$1"
|
sudo "$EDITOR" "$1"
|
||||||
|
elif [ "$(is_cmd_exists sudoedit)" -eq "0" ]; then
|
||||||
|
sudoedit "$1"
|
||||||
elif [ "$(is_cmd_exists doas)" -eq "0" ]; then
|
elif [ "$(is_cmd_exists doas)" -eq "0" ]; then
|
||||||
doas "$EDITOR" "$1"
|
doas "$EDITOR" "$1"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue