aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-01-15 17:18:10 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-01-15 17:18:10 +0530
commit38de6efd480c2523e6623ed0af241d31b7e6c948 (patch)
tree9d65dae757b18845ebd7d735ffe68c42b489a5f7
parent22454d6893b84d32d81e6705bf048c8f6feee977 (diff)
downloadnnn-38de6efd480c2523e6623ed0af241d31b7e6c948.tar.gz
Change command order
-rwxr-xr-xplugins/suedit6
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