From 38de6efd480c2523e6623ed0af241d31b7e6c948 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Wed, 15 Jan 2020 17:18:10 +0530 Subject: [PATCH] Change command order --- plugins/suedit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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