mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-06 08:01:40 +03:00
Ticket #2742: [Subshell] Support for ash + bugfixes for bash, fish
Fix non-functional INPUTRC for bash (variable was unset and never used) Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
2e651d00bd
commit
239f695d83
@ -209,6 +209,7 @@ static void
|
||||
init_subshell_child (const char *pty_name)
|
||||
{
|
||||
char *init_file = NULL;
|
||||
char *putenv_str = NULL;
|
||||
pid_t mc_sid;
|
||||
|
||||
(void) pty_name;
|
||||
@ -257,8 +258,10 @@ init_subshell_child (const char *pty_name)
|
||||
switch (subshell_type)
|
||||
{
|
||||
case BASH:
|
||||
/* Do we have a custom init file ~/.local/share/mc/bashrc? */
|
||||
init_file = mc_config_get_full_path ("bashrc");
|
||||
|
||||
/* Otherwise use ~/.bashrc */
|
||||
if (access (init_file, R_OK) == -1)
|
||||
{
|
||||
g_free (init_file);
|
||||
@ -273,9 +276,8 @@ init_subshell_child (const char *pty_name)
|
||||
char *input_file = mc_config_get_full_path ("inputrc");
|
||||
if (access (input_file, R_OK) == 0)
|
||||
{
|
||||
char *putenv_str = g_strconcat ("INPUTRC=", input_file, NULL);
|
||||
putenv_str = g_strconcat ("INPUTRC=", input_file, NULL);
|
||||
putenv (putenv_str);
|
||||
g_free (putenv_str);
|
||||
}
|
||||
g_free (input_file);
|
||||
}
|
||||
@ -341,6 +343,7 @@ init_subshell_child (const char *pty_name)
|
||||
|
||||
/* If we get this far, everything failed miserably */
|
||||
g_free (init_file);
|
||||
g_free (putenv_str);
|
||||
my_exit (FORK_FAILURE);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user