[Pkg-mc-devel] Bug#703741: Patch

Dmitry Borisyuk q1werty at i.com.ua
Thu Dec 11 21:29:55 UTC 2014


Control: tags -1 patch

A simple solution for this problem is to send C-k C-u to the shell
before sending 'cd' command, which will erase previous unfinished text
(C-k is needed for bash if the cursor is in the middle of the line).
I've tried the following patch with bash, zsh and tcsh and it works fine.


--- a/src/subshell.c
+++ b/src/subshell.c
@@ -1190,7 +1190,7 @@
 
     /* The initial space keeps this out of the command history (in bash
        because we set "HISTCONTROL=ignorespace") */
-    write_all (mc_global.tty.subshell_pty, " cd ", 4);
+    write_all (mc_global.tty.subshell_pty, "\013\025 cd ", 6);
 
     directory = vfs_path_to_str (vpath);
     if (directory != '\0')



More information about the Pkg-mc-devel mailing list