Skip to content

Commit

Permalink
Merge branch '3124_zsh_escape_history'
Browse files Browse the repository at this point in the history
* 3124_zsh_escape_history:
  Ticket #3124: really escape Zsh history
  • Loading branch information
aborodin committed Jan 4, 2014
2 parents dcedeab + 72544ce commit 1110818
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/subshell.c
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,17 @@ do_subshell_chdir (const vfs_path_t * vpath, gboolean update_prompt)
}
}

/* Really escape Zsh history */
if (subshell_type == ZSH)
{
/* 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. */
write_all (mc_global.tty.subshell_pty, " \n", 2);
subshell_state = RUNNING_COMMAND;
feed_subshell (QUIETLY, FALSE);
}

update_subshell_prompt = FALSE;

g_free (pcwd);
Expand Down

0 comments on commit 1110818

Please sign in to comment.