Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix passing arguments in hstrnotiocsti #527

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion man/hstr.1
Original file line number Diff line number Diff line change
Expand Up @@ -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="$( { </dev/tty hstr ${READLINE_LINE}; } 2>&1 1>&3 3>&- )"; } 3>&1;
{ HSTR_OUT="$( { </dev/tty hstr -- ${READLINE_LINE}; } 2>&1 1>&3 3>&- )"; } 3>&1;
READLINE_LINE="$(hstr ${READLINE_LINE})"
READLINE_POINT=${#READLINE_LINE}
}
Expand Down
2 changes: 1 addition & 1 deletion src/hstr.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ void print_bash_install_code(void)
#else
"\nfunction hstrnotiocsti {"
#endif
"\n { READLINE_LINE=\"$( { </dev/tty hstr ${READLINE_LINE}; } 2>&1 1>&3 3>&- )\"; } 3>&1;"
"\n { READLINE_LINE=\"$( { </dev/tty hstr -- ${READLINE_LINE}; } 2>&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)"
Expand Down
2 changes: 1 addition & 1 deletion test/sh/tiotcsi-function-bash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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="$( { </dev/tty hstr ${READLINE_LINE}; } 2>&1 1>&3 3>&- )"; } 3>&1;
{ HSTR_OUT="$( { </dev/tty hstr -- ${READLINE_LINE}; } 2>&1 1>&3 3>&- )"; } 3>&1;
READLINE_LINE="${HSTR_OUT}"
READLINE_POINT=${#READLINE_LINE}
}
Expand Down