mirror of
https://github.com/troglobit/finit.git
synced 2026-10-02 14:02:52 +07:00
Beautify code
This commit is contained in:
+5
-7
@@ -221,13 +221,11 @@ int serv_edit(char *arg)
|
||||
if (!fexist(path))
|
||||
return serv_list(NULL);
|
||||
|
||||
if (systemf("[ -x \"$(command -v sensible-editor)\" ] && sensible-editor %s", path) != 0)
|
||||
if (systemf("[ -x \"$(command -v editor)\" ] && editor %s", path) != 0)
|
||||
if (systemf("${VISUAL:-${EDITOR:-$(command -v vi)}} %s", path) != 0)
|
||||
if (systemf("[ -x \"$(command -v mg)\" ] && mg %s", path) != 0)
|
||||
systemf("[ -x \"$(command -v vi)\" ] && vi %s", path);
|
||||
|
||||
return 0;
|
||||
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