diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2020-01-15 17:18:10 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2020-01-15 17:18:10 +0530 |
commit | 38de6efd480c2523e6623ed0af241d31b7e6c948 (patch) | |
tree | 9d65dae757b18845ebd7d735ffe68c42b489a5f7 /plugins | |
parent | 22454d6893b84d32d81e6705bf048c8f6feee977 (diff) | |
download | nnn-38de6efd480c2523e6623ed0af241d31b7e6c948.tar.gz |
Change command order
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/suedit | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/suedit b/plugins/suedit index 7ba00db..7598525 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 |