mirror of
https://github.com/dvorka/hstr.git
synced 2024-12-26 01:15:26 +08:00
Update manpage and append -- to hstr calls
This commit is contained in:
parent
4dca4c72d7
commit
02306b8b8a
2 changed files with 4 additions and 5 deletions
|
@ -199,8 +199,7 @@ export HISTSIZE=${HISTFILESIZE} # increase history size (default is 500)
|
||||||
# ensure synchronization between bash memory and history file
|
# ensure synchronization between bash memory and history file
|
||||||
export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}"
|
export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}"
|
||||||
function hstrnotiocsti {
|
function hstrnotiocsti {
|
||||||
{ HSTR_OUT="$( { </dev/tty hstr ${READLINE_LINE}; } 2>&1 1>&3 3>&- )"; } 3>&1;
|
{ READLINE_LINE=\"$( { </dev/tty hstr -- ${READLINE_LINE}; } 2>&1 1>&3 3>&- )\"; } 3>&1;
|
||||||
READLINE_LINE="$(hstr ${READLINE_LINE})"
|
|
||||||
READLINE_POINT=${#READLINE_LINE}
|
READLINE_POINT=${#READLINE_LINE}
|
||||||
}
|
}
|
||||||
# if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc)
|
# 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
|
export HSTR_CONFIG=hicolor # get more colors
|
||||||
hstr_no_tiocsti() {
|
hstr_no_tiocsti() {
|
||||||
zle -I
|
zle -I
|
||||||
{ HSTR_OUT="$( { </dev/tty hstr ${BUFFER}; } 2>&1 1>&3 3>&- )"; } 3>&1;
|
{ HSTR_OUT="$( { </dev/tty hstr -- ${BUFFER}; } 2>&1 1>&3 3>&- )"; } 3>&1;
|
||||||
BUFFER="${HSTR_OUT}"
|
BUFFER="${HSTR_OUT}"
|
||||||
CURSOR=${#BUFFER}
|
CURSOR=${#BUFFER}
|
||||||
zle redisplay
|
zle redisplay
|
||||||
|
|
|
@ -364,7 +364,7 @@ void print_bash_install_code(void)
|
||||||
#else
|
#else
|
||||||
"\nfunction hstrnotiocsti {"
|
"\nfunction hstrnotiocsti {"
|
||||||
#endif
|
#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 READLINE_POINT=${#READLINE_LINE}"
|
||||||
"\n}"
|
"\n}"
|
||||||
"\n# if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc)"
|
"\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
|
#endif
|
||||||
|
|
||||||
"\n zle -I"
|
"\n zle -I"
|
||||||
"\n { HSTR_OUT=\"$( { </dev/tty hstr ${BUFFER}; } 2>&1 1>&3 3>&- )\"; } 3>&1;"
|
"\n { HSTR_OUT=\"$( { </dev/tty hstr -- ${BUFFER}; } 2>&1 1>&3 3>&- )\"; } 3>&1;"
|
||||||
"\n BUFFER=\"${HSTR_OUT}\""
|
"\n BUFFER=\"${HSTR_OUT}\""
|
||||||
"\n CURSOR=${#BUFFER}"
|
"\n CURSOR=${#BUFFER}"
|
||||||
"\n zle redisplay"
|
"\n zle redisplay"
|
||||||
|
|
Loading…
Reference in a new issue