Ticket #3124: 0001-Ticket-3124-really-escape-Zsh-history.patch

File 0001-Ticket-3124-really-escape-Zsh-history.patch, 1001 bytes (added by z0rc, 11 years ago)
  • src/subshell.c

    From 36cd293a4ca087810d541c4b2a303e4fcc6b4334 Mon Sep 17 00:00:00 2001
    From: Igor Urazov <z0rc3r@gmail.com>
    Date: Mon, 16 Dec 2013 22:06:01 +0200
    Subject: [PATCH] Ticket #3124: really escape Zsh history
    
    Per Zsh documentation last command prefixed with space lingers in the
    internal history until the next command is entered before it vanishes.
    To make it vanish right away, type a space and press return.
    ---
     src/subshell.c | 8 ++++++++
     1 file changed, 8 insertions(+)
    
    diff --git a/src/subshell.c b/src/subshell.c
    index 80ce405..0a7b941 100644
    a b do_subshell_chdir (const vfs_path_t * vpath, gboolean update_prompt) 
    12331233        } 
    12341234    } 
    12351235 
     1236    /* Really escape Zsh history */ 
     1237    if (subshell_type == ZSH) 
     1238    { 
     1239        write_all (mc_global.tty.subshell_pty, " \n", 2); 
     1240        subshell_state = RUNNING_COMMAND; 
     1241        feed_subshell (QUIETLY, FALSE); 
     1242    } 
     1243 
    12361244    update_subshell_prompt = FALSE; 
    12371245 
    12381246    g_free (pcwd);