1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
From: Dmitry Shachnev <mitya57@debian.org>
Date: Tue, 28 Oct 2025 15:27:05 +0300
Subject: Run in editor mode when called as /usr/bin/editor symlink
In Debian, /usr/bin/editor is managed by alternatives system, and
I am going to register far2ledit as a possible alternative for that.
Forwarded: https://github.com/elfmz/far2l/pull/3022
---
far2l/src/main.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/far2l/src/main.cpp b/far2l/src/main.cpp
index 4dcc5c1..2b13f64 100644
--- a/far2l/src/main.cpp
+++ b/far2l/src/main.cpp
@@ -87,7 +87,7 @@ int DirectRT = 0;
static void print_help(const char *self)
{
- bool is_far2ledit = strstr(self, "far2ledit") != NULL;
+ bool is_far2ledit = strstr(self, "edit") != NULL;
printf("FAR2L Version: %s\n"
"FAR2L - two-panel file manager, with built-in terminal and other usefulness'es\n"
"Usage: %s [switches] [-cd apath [-cd ppath]]\n"
@@ -457,7 +457,7 @@ int FarAppMain(int argc, char **argv)
}
// run by symlink in editor mode
- bool is_far2ledit = strstr(argv[0], "far2ledit") != NULL;
+ bool is_far2ledit = strstr(argv[0], "edit") != NULL;
if (is_far2ledit) {
Opt.OnlyEditorViewerUsed = Options::ONLY_EDITOR;
if (argc > 1) {
|