Search on history using inputrc
This commit is contained in:
parent
d948b4a4d1
commit
01c6c74357
24
bash/bashrc
24
bash/bashrc
@ -85,7 +85,7 @@ if [ -x /usr/bin/dircolors ]; then
|
||||
fi
|
||||
|
||||
# colored GCC warnings and errors
|
||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||
|
||||
# some more ls aliases
|
||||
alias ll='ls -alF'
|
||||
@ -116,25 +116,37 @@ if ! shopt -oq posix; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Colors
|
||||
red='\033[0;31m'
|
||||
green='\033[0;32m'
|
||||
nc='\033[0m'
|
||||
|
||||
for f in ~/.dotfiles/bash/functions/*/*;
|
||||
do
|
||||
echo "Sourcing $f ..."
|
||||
echo -e "${green} * ${nc} Sourcing $f ..."
|
||||
. $f
|
||||
done
|
||||
|
||||
if [ -f /usr/share/bash-completion/completions/git ]
|
||||
then
|
||||
echo "Adding git completion ..."
|
||||
echo -e "${green} * ${nc} Adding git completion ..."
|
||||
source /usr/share/bash-completion/completions/git
|
||||
fi
|
||||
|
||||
echo "Adding local path folders ... ~/.local/bin"
|
||||
echo -e "${green} * ${nc} Adding local path folders ... ~/.local/bin"
|
||||
export PATH="$PATH:~/.local/bin"
|
||||
|
||||
echo "Setting vim as editor ..."
|
||||
echo -e "${green} * ${nc} Setting vim as editor ..."
|
||||
export EDITOR=vim
|
||||
|
||||
echo "Initializing starship ..."
|
||||
echo -e "${green} * ${nc} Initializing starship ..."
|
||||
eval "$(starship init bash)"
|
||||
|
||||
if grep -qEi "(Microsoft|WSL)" /proc/version &> /dev/null
|
||||
then
|
||||
echo -e "${green} * ${nc} WSL env detected ..."
|
||||
export DISPLAY=:0.0
|
||||
fi
|
||||
|
||||
echo -e "Ready${green}!${nc}"
|
||||
|
||||
|
3
inputrc
3
inputrc
@ -1,2 +1,5 @@
|
||||
set bell-style none
|
||||
# map "page up" and "page down" to search history based on current cmdline
|
||||
"\e[5~": history-search-backward
|
||||
"\e[6~": history-search-forward
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user