Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This PR addresses three related line editor bugs: * When using read in emacs mode, tab invariably rings the bell. * When using read n vi mode, tab rings the bell in the first two positions, and at all times when the line is blank. * If the vi line editor has been built and all line editors have been turned off, tab rings the bell in the first two positions and at all times when the line is blank. Tab completion in the read builtin was disabled in 2002 (ksh93n-); sh.nextprompt tracks whether the builtin is in use. In ksh93u+m, tab completion was eventually turned off both at the start of the line (21afb07, d9865ce) and in blank lines (a7d6394) in order to prevent corrupt output and other problems. These changes introduced the current bell-ringing behavior. Tab output in read (and when running under no line editor if the shell was built with SHOPT_VSH) can be restored with two light tweaks to completion handling: src/cmd/ksh93/edit/emacs.c: - When checking for tab completion, only beep when read is not in use (i.e., when sh.nextprompt is non-zero). src/cmd/ksh93/edit/vi.c: - Skip all tab completion handling when in read and if vi mode is turned off. Resolves: #676
- Loading branch information