mc_shell 64 lib/shell.c mc_shell_t *mc_shell; mc_shell 66 lib/shell.c mc_shell = g_new0 (mc_shell_t, 1); mc_shell 70 lib/shell.c mc_shell->path = g_strdup ("/bin/bash"); mc_shell 72 lib/shell.c mc_shell->path = g_strdup ("/bin/ash"); mc_shell 74 lib/shell.c mc_shell->path = g_strdup ("/bin/dash"); mc_shell 76 lib/shell.c mc_shell->path = g_strdup ("/bin/busybox"); mc_shell 78 lib/shell.c mc_shell->path = g_strdup ("/bin/zsh"); mc_shell 80 lib/shell.c mc_shell->path = g_strdup ("/bin/tcsh"); mc_shell 82 lib/shell.c mc_shell->path = g_strdup ("/bin/csh"); mc_shell 92 lib/shell.c mc_shell->path = g_strdup ("/bin/sh"); mc_shell 94 lib/shell.c return mc_shell; mc_shell 127 lib/shell.c mc_shell_t *mc_shell = NULL; mc_shell 135 lib/shell.c mc_shell = g_new0 (mc_shell_t, 1); mc_shell 136 lib/shell.c mc_shell->path = shell_name; mc_shell 139 lib/shell.c return mc_shell; mc_shell 145 lib/shell.c mc_shell_recognize_real_path (mc_shell_t *mc_shell) mc_shell 147 lib/shell.c if (strstr (mc_shell->path, "/zsh") != NULL || strstr (mc_shell->real_path, "/zsh") != NULL mc_shell 151 lib/shell.c mc_shell->type = SHELL_ZSH; mc_shell 152 lib/shell.c mc_shell->name = "zsh"; mc_shell 154 lib/shell.c else if (strstr (mc_shell->path, "/tcsh") != NULL mc_shell 155 lib/shell.c || strstr (mc_shell->real_path, "/tcsh") != NULL) mc_shell 158 lib/shell.c mc_shell->type = SHELL_TCSH; mc_shell 159 lib/shell.c mc_shell->name = "tcsh"; mc_shell 161 lib/shell.c else if (strstr (mc_shell->path, "/csh") != NULL mc_shell 162 lib/shell.c || strstr (mc_shell->real_path, "/csh") != NULL) mc_shell 164 lib/shell.c mc_shell->type = SHELL_TCSH; mc_shell 165 lib/shell.c mc_shell->name = "csh"; mc_shell 167 lib/shell.c else if (strstr (mc_shell->path, "/fish") != NULL mc_shell 168 lib/shell.c || strstr (mc_shell->real_path, "/fish") != NULL) mc_shell 170 lib/shell.c mc_shell->type = SHELL_FISH; mc_shell 171 lib/shell.c mc_shell->name = "fish"; mc_shell 173 lib/shell.c else if (strstr (mc_shell->path, "/dash") != NULL mc_shell 174 lib/shell.c || strstr (mc_shell->real_path, "/dash") != NULL) mc_shell 177 lib/shell.c mc_shell->type = SHELL_DASH; mc_shell 178 lib/shell.c mc_shell->name = "dash"; mc_shell 180 lib/shell.c else if (strstr (mc_shell->real_path, "/busybox") != NULL) mc_shell 189 lib/shell.c mc_shell->type = SHELL_ASH_BUSYBOX; mc_shell 190 lib/shell.c mc_shell->name = mc_shell->path; mc_shell 193 lib/shell.c mc_shell->type = SHELL_NONE; mc_shell 199 lib/shell.c mc_shell_recognize_path (mc_shell_t *mc_shell) mc_shell 202 lib/shell.c if (strstr (mc_shell->path, "/bash") != NULL || getenv ("BASH") != NULL) mc_shell 204 lib/shell.c mc_shell->type = SHELL_BASH; mc_shell 205 lib/shell.c mc_shell->name = "bash"; mc_shell 207 lib/shell.c else if (strstr (mc_shell->path, "/sh") != NULL || getenv ("SH") != NULL) mc_shell 209 lib/shell.c mc_shell->type = SHELL_SH; mc_shell 210 lib/shell.c mc_shell->name = "sh"; mc_shell 212 lib/shell.c else if (strstr (mc_shell->path, "/ash") != NULL || getenv ("ASH") != NULL) mc_shell 214 lib/shell.c mc_shell->type = SHELL_ASH_BUSYBOX; mc_shell 215 lib/shell.c mc_shell->name = "ash"; mc_shell 218 lib/shell.c mc_shell->type = SHELL_NONE; mc_shell 228 lib/shell.c mc_shell_t *mc_shell; mc_shell 230 lib/shell.c mc_shell = mc_shell_get_from_env (); mc_shell 232 lib/shell.c if (mc_shell == NULL) mc_shell 233 lib/shell.c mc_shell = mc_shell_get_installed_in_system (); mc_shell 235 lib/shell.c mc_shell->real_path = mc_realpath (mc_shell->path, rp_shell); mc_shell 240 lib/shell.c if (mc_shell->real_path != NULL) mc_shell 241 lib/shell.c mc_shell_recognize_real_path (mc_shell); mc_shell 243 lib/shell.c if (mc_shell->type == SHELL_NONE) mc_shell 244 lib/shell.c mc_shell_recognize_path (mc_shell); mc_shell 246 lib/shell.c if (mc_shell->type == SHELL_NONE) mc_shell 249 lib/shell.c mc_global.shell = mc_shell;