Skip to content

Commit 59f1b0d

Browse files
authored
Fix passing arguments in hstrnotiocsti (#527)
1 parent d8dae7e commit 59f1b0d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

man/hstr.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export HISTSIZE=${HISTFILESIZE} # increase history size (default is 500)
199199
# ensure synchronization between bash memory and history file
200200
export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}"
201201
function hstrnotiocsti {
202-
{ HSTR_OUT="$( { </dev/tty hstr ${READLINE_LINE}; } 2>&1 1>&3 3>&- )"; } 3>&1;
202+
{ HSTR_OUT="$( { </dev/tty hstr -- ${READLINE_LINE}; } 2>&1 1>&3 3>&- )"; } 3>&1;
203203
READLINE_LINE="$(hstr ${READLINE_LINE})"
204204
READLINE_POINT=${#READLINE_LINE}
205205
}

src/hstr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ void print_bash_install_code(void)
364364
#else
365365
"\nfunction hstrnotiocsti {"
366366
#endif
367-
"\n { READLINE_LINE=\"$( { </dev/tty hstr ${READLINE_LINE}; } 2>&1 1>&3 3>&- )\"; } 3>&1;"
367+
"\n { READLINE_LINE=\"$( { </dev/tty hstr -- ${READLINE_LINE}; } 2>&1 1>&3 3>&- )\"; } 3>&1;"
368368
"\n READLINE_POINT=${#READLINE_LINE}"
369369
"\n}"
370370
"\n# if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc)"

test/sh/tiotcsi-function-bash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export HISTSIZE=${HISTFILESIZE} # increase history size (default is 500)
188188
export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}"
189189
# if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc)
190190
function hstrnotiocsti {
191-
{ HSTR_OUT="$( { </dev/tty hstr ${READLINE_LINE}; } 2>&1 1>&3 3>&- )"; } 3>&1;
191+
{ HSTR_OUT="$( { </dev/tty hstr -- ${READLINE_LINE}; } 2>&1 1>&3 3>&- )"; } 3>&1;
192192
READLINE_LINE="${HSTR_OUT}"
193193
READLINE_POINT=${#READLINE_LINE}
194194
}

0 commit comments

Comments
 (0)