From 02306b8b8a870061b9bed92e5a02546e72f11c68 Mon Sep 17 00:00:00 2001 From: Jake Dane <114460917+jakedane@users.noreply.github.com> Date: Thu, 20 Apr 2023 18:18:49 +0200 Subject: [PATCH] Update manpage and append -- to hstr calls --- man/hstr.1 | 5 ++--- src/hstr.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/man/hstr.1 b/man/hstr.1 index 9aee3db..964af4a 100644 --- a/man/hstr.1 +++ b/man/hstr.1 @@ -199,8 +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; - READLINE_LINE="$(hstr ${READLINE_LINE})" + { READLINE_LINE=\"$( { &1 1>&3 3>&- )\"; } 3>&1; READLINE_POINT=${#READLINE_LINE} } # if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc) @@ -232,7 +231,7 @@ setopt histignorespace # skip cmds w/ leading space from history export HSTR_CONFIG=hicolor # get more colors hstr_no_tiocsti() { zle -I - { HSTR_OUT="$( { &1 1>&3 3>&- )"; } 3>&1; + { HSTR_OUT="$( { &1 1>&3 3>&- )"; } 3>&1; BUFFER="${HSTR_OUT}" CURSOR=${#BUFFER} zle redisplay diff --git a/src/hstr.c b/src/hstr.c index 8183031..29471d8 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)" @@ -403,7 +403,7 @@ void print_zsh_install_code(void) #endif "\n zle -I" - "\n { HSTR_OUT=\"$( { &1 1>&3 3>&- )\"; } 3>&1;" + "\n { HSTR_OUT=\"$( { &1 1>&3 3>&- )\"; } 3>&1;" "\n BUFFER=\"${HSTR_OUT}\"" "\n CURSOR=${#BUFFER}" "\n zle redisplay"