-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
read -s: initialise history file in time for reading
When emacs or vi mode is activated in a script, 'read -s' should allow the user to arrow up to the current shell history file ($HISTFILE, default ~/.sh_history). But it looks like the history file is not properly initialised for 'read -s' as it does not work on the first invocation: $ ksh -c 'set -o emacs; read -s foo' (type up arrow; beep -- before 7bfcd1e, infinite loop) $ ksh -c 'set -o emacs; read -s foo; read -s foo' (type return, then up arrow; shell history appears) src/cmd/ksh93/bltins/read.c: sh_readline(): - Move the code block that initialises the shell history file to immediately before where the first read operation is performed. Discussion: #701 (comment)
- Loading branch information
Showing
3 changed files
with
23 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters