Ticket #4521: fish_cd_history.patch

File fish_cd_history.patch, 1.1 KB (added by htower, 4 months ago)
  • src/subshell/common.c

    diff --git a/src/subshell/common.c b/src/subshell/common.c
    index 1c432fd7e..90ec8d750 100644
    a b do_subshell_chdir (const vfs_path_t * vpath, gboolean update_prompt) 
    17781778        } 
    17791779    } 
    17801780 
    1781     /* Really escape Zsh history */ 
    1782     if (mc_global.shell->type == SHELL_ZSH) 
     1781    /* Really escape Zsh/Fish history */ 
     1782    if (mc_global.shell->type == SHELL_ZSH || mc_global.shell->type == SHELL_FISH) 
    17831783    { 
    17841784        /* Per Zsh documentation last command prefixed with space lingers in the internal history 
    17851785         * until the next command is entered before it vanishes. To make it vanish right away, 
    1786          * type a space and press return. */ 
     1786         * type a space and press return. 
     1787         * 
     1788         * Fish shell now also provides the same behavior: 
     1789         * https://github.com/fish-shell/fish-shell/commit/9fdc4f903b8b421b18389a0f290d72cc88c128bb 
     1790         * */ 
    17871791        write_all (mc_global.tty.subshell_pty, " \n", 2); 
    17881792        subshell_state = RUNNING_COMMAND; 
    17891793        feed_subshell (QUIETLY, TRUE);