mirror of
https://github.com/troglobit/finit.git
synced 2026-10-06 15:50:12 +07:00
initctl: fix logic in edit command fallback handling
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+5
-5
@@ -221,11 +221,11 @@ int serv_edit(char *arg)
|
||||
if (!fexist(path))
|
||||
return serv_list(NULL);
|
||||
|
||||
return systemf("[ -x \"$(command -v sensible-editor)\" ] && sensible-editor %s", path) || \
|
||||
systemf("[ -x \"$(command -v editor)\" ] && editor %s", path) || \
|
||||
systemf("${VISUAL:-${EDITOR:-$(command -v vi)}} %s", path) || \
|
||||
systemf("[ -x \"$(command -v mg)\" ] && mg %s", path) || \
|
||||
systemf("[ -x \"$(command -v vi)\" ] && vi %s", path);
|
||||
return !systemf("[ -x \"$(command -v sensible-editor)\" ] && sensible-editor %s", path) || \
|
||||
!systemf("[ -x \"$(command -v editor)\" ] && editor %s", path) || \
|
||||
!systemf("${VISUAL:-${EDITOR:-$(command -v vi)}} %s", path) || \
|
||||
!systemf("[ -x \"$(command -v mg)\" ] && mg %s", path) || \
|
||||
!systemf("[ -x \"$(command -v vi)\" ] && vi %s", path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user