diff --git a/man/hstr.1 b/man/hstr.1 index 9aee3db7..aed57b84 100644 --- a/man/hstr.1 +++ b/man/hstr.1 @@ -199,7 +199,7 @@ export HISTSIZE=${HISTFILESIZE} # increase history size (default is 500) # ensure synchronization between bash memory and history file export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}" function hstrnotiocsti { - { HSTR_OUT="$( { &1 1>&3 3>&- )"; } 3>&1; + { HSTR_OUT="$( { &1 1>&3 3>&- )"; } 3>&1; READLINE_LINE="$(hstr ${READLINE_LINE})" READLINE_POINT=${#READLINE_LINE} } diff --git a/src/hstr.c b/src/hstr.c index 8183031b..fd162a61 100644 --- a/src/hstr.c +++ b/src/hstr.c @@ -364,7 +364,7 @@ void print_bash_install_code(void) #else "\nfunction hstrnotiocsti {" #endif - "\n { READLINE_LINE=\"$( { &1 1>&3 3>&- )\"; } 3>&1;" + "\n { READLINE_LINE=\"$( { &1 1>&3 3>&- )\"; } 3>&1;" "\n READLINE_POINT=${#READLINE_LINE}" "\n}" "\n# if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc)" diff --git a/test/sh/tiotcsi-function-bash.sh b/test/sh/tiotcsi-function-bash.sh index 863967dd..18c492f1 100755 --- a/test/sh/tiotcsi-function-bash.sh +++ b/test/sh/tiotcsi-function-bash.sh @@ -188,7 +188,7 @@ export HISTSIZE=${HISTFILESIZE} # increase history size (default is 500) export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}" # if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc) function hstrnotiocsti { - { HSTR_OUT="$( { &1 1>&3 3>&- )"; } 3>&1; + { HSTR_OUT="$( { &1 1>&3 3>&- )"; } 3>&1; READLINE_LINE="${HSTR_OUT}" READLINE_POINT=${#READLINE_LINE} }