From: Arun Prakash Jana Date: Wed, 15 Jan 2020 11:48:10 +0000 (+0530) Subject: Change command order X-Git-Tag: v3.0~85 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=38de6efd480c2523e6623ed0af241d31b7e6c948;p=nnn.git Change command order --- diff --git a/plugins/suedit b/plugins/suedit index 7ba00db1..7598525b 100755 --- a/plugins/suedit +++ b/plugins/suedit @@ -12,10 +12,10 @@ is_cmd_exists () { echo $? } -if [ "$(is_cmd_exists sudoedit)" -eq "0" ]; then - sudoedit "$1" -elif [ "$(is_cmd_exists sudo)" -eq "0" ]; then +if [ "$(is_cmd_exists sudo)" -eq "0" ]; then sudo "$EDITOR" "$1" +elif [ "$(is_cmd_exists sudoedit)" -eq "0" ]; then + sudoedit "$1" elif [ "$(is_cmd_exists doas)" -eq "0" ]; then doas "$EDITOR" "$1" fi