From 6dfbebf71e0de7fd40c1fc41776bbe231d189a41 Mon Sep 17 00:00:00 2001 From: "Yury V. Zaytsev" Date: Wed, 16 Mar 2016 14:58:37 +0100 Subject: [PATCH 1/2] Ticket #2742: detect csh as tcsh by name Signed-off-by: Yury V. Zaytsev --- lib/shell.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/shell.c b/lib/shell.c index da33ef4e8..d3889e7f1 100644 --- a/lib/shell.c +++ b/lib/shell.c @@ -154,6 +154,12 @@ mc_shell_recognize_real_path (mc_shell_t * mc_shell) mc_shell->type = SHELL_TCSH; mc_shell->name = "tcsh"; } + else if (strstr (mc_shell->path, "/csh") != NULL + || strstr (mc_shell->real_path, "/csh") != NULL) + { + mc_shell->type = SHELL_TCSH; + mc_shell->name = "csh"; + } else if (strstr (mc_shell->path, "/fish") != NULL || strstr (mc_shell->real_path, "/fish") != NULL) { From 0430ec719b52daa3e318a84f6089c8e47eb8bbbe Mon Sep 17 00:00:00 2001 From: "Yury V. Zaytsev" Date: Sun, 24 Apr 2016 17:17:48 +0200 Subject: [PATCH 2/2] Add `csh` to the list of fallback shell options Signed-off-by: Yury V. Zaytsev --- lib/shell.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/shell.c b/lib/shell.c index d3889e7f1..eb149def4 100644 --- a/lib/shell.c +++ b/lib/shell.c @@ -76,6 +76,8 @@ mc_shell_get_installed_in_system (void) mc_shell->path = g_strdup ("/bin/zsh"); else if (access ("/bin/tcsh", X_OK) == 0) mc_shell->path = g_strdup ("/bin/tcsh"); + else if (access ("/bin/csh", X_OK) == 0) + mc_shell->path = g_strdup ("/bin/csh"); /* No fish as fallback because it is so much different from other shells and * in a way exotic (even though user-friendly by name) that we should not * present it as a subshell without the user's explicit intention. We rather