Ticket #3689: 3689-bash-subshell.patch

File 3689-bash-subshell.patch, 785 bytes (added by alllexx88, 5 years ago)
  • src/subshell/common.c

    a b  
    355355    switch (mc_global.shell->type) 
    356356    { 
    357357    case SHELL_BASH: 
    358         execl (mc_global.shell->path, "bash", "-rcfile", init_file, (char *) NULL); 
     358        execl (mc_global.shell->path, mc_global.shell->name, "-rcfile", init_file, (char *) NULL); 
    359359        break; 
    360360 
    361361    case SHELL_ZSH: 
  • lib/shell.c

    a b  
    187187        mc_shell->type = SHELL_ASH_BUSYBOX; 
    188188        mc_shell->name = mc_shell->path; 
    189189    } 
     190    else if (strstr (mc_shell->real_path, "/bash") != NULL) 
     191    { 
     192        /* Sometimes /bin/sh or /bin/ash is a link to bash */ 
     193        mc_shell->type = SHELL_BASH; 
     194        mc_shell->name = mc_shell->path; 
     195    } 
    190196    else 
    191197        mc_shell->type = SHELL_NONE; 
    192198}