You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deciding upfront whether the kernel supports TIOCSTI or not might be difficult, so what about using this as bash init code?
####
# hstr configuration
alias hh=hstr # hh to be alias for hstr
export HSTR_CONFIG=hicolor # get more colors
shopt -s histappend # append new history items to .bash_history
export HISTCONTROL=ignorespace # leading space hides commands from history
export HISTFILESIZE=10000 # increase history file size (default is 500)
export HISTSIZE=${HISTFILESIZE} # increase history size (default is 500)
if [ -r /proc/sys/dev/tty/legacy_tiocsti ] ; then
LEGACY_TIOCSTI=`cat /proc/sys/dev/tty/legacy_tiocsti`
else
LEGACY_TIOCSTI=0
fi
if [ $LEGACY_TIOCSTI = 0 ] ; then
function hstrnotiocsti {
{ HSTR_OUT="$( { </dev/tty hstr ${READLINE_LINE}; } 2>&1 1>&3 3>&- )"; } 3>&1;
READLINE_LINE="$(hstr ${READLINE_LINE})"
READLINE_POINT=${#READLINE_LINE}
}
# if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc)
if [[ $- =~ .*i.* ]]; then bind -x '""hstrnotiocsti"'; fi
export HSTR_TIOCSTI=n
else
# Optionally add the following lines to ~/.bashrc if TIOCSTI is supported by your OS:
# if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc)
if [[ $- =~ .*i.* ]]; then bind '"\C-r": "\C-a hstr -- \C-j"'; fi
fi
The text was updated successfully, but these errors were encountered:
Deciding upfront whether the kernel supports TIOCSTI or not might be difficult, so what about using this as bash init code?
The text was updated successfully, but these errors were encountered: