On 8/22/16 9:43 AM, Jaro Punta wrote: > I am not sure this is a bug but I cannot find an explanation why this > happens. Sometimes when I execute certain commands, and I press the > Tab key while I am typing the command, then after the commands > finishes, the terminal is left in a abnormal state (e.g. terminal echo > is off). This seems to happen when the program in the command has an > associated completion function that performs certain actions, such as > calling grep.
Thanks for the report. This happens when a programmable completion function calls an external command during the execution of a completion function. Bash saves the tty state after every successful job completes, so it can restore it if a job is killed by a signal and leaves the terminal in an undesired state. In this case, we need to suppress that if the job that completes is run during programmable completion, since the terminal settings at that time are as readline sets them for line editing. This fix will be in the release version of bash-4.4. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/