mirror of
https://github.com/FAUSheppy/config
synced 2025-12-06 15:11:35 +01:00
Now with 100% more reverse search
This commit is contained in:
19
zshrc
19
zshrc
@@ -232,7 +232,7 @@ if [[ $HOST =~ faui* ]]; then
|
|||||||
mesg n
|
mesg n
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### Experimental ###
|
### COLOR SSH ###
|
||||||
alias unfuck="printf '\033]708;black\007'"
|
alias unfuck="printf '\033]708;black\007'"
|
||||||
ssh_func(){
|
ssh_func(){
|
||||||
printf '\033]708;red\007';
|
printf '\033]708;red\007';
|
||||||
@@ -240,12 +240,21 @@ ssh_func(){
|
|||||||
printf '\033]708;black\007'
|
printf '\033]708;black\007'
|
||||||
}
|
}
|
||||||
alias -g ssh="ssh_func"
|
alias -g ssh="ssh_func"
|
||||||
alias hs='eval $(cat ~/.config/zshhistory.log | peco)'
|
|
||||||
alias cfind='print -z $(cat ~/.config/zshhistory.log | peco)'
|
|
||||||
hhs(){print -z "$(cat ~/.config/zshhistory.log | peco)"}
|
### REVERSE SEARCH ###
|
||||||
|
if ! [ -x "$(command -v peco)" ]; then
|
||||||
|
PECO=~/.config/bin/
|
||||||
|
else
|
||||||
|
PECO=/usr/bin/
|
||||||
|
fi
|
||||||
|
|
||||||
|
alias cfind='print -z $(cat ~/.config/zshhistory.log | $PECO/peco)'
|
||||||
|
hhs(){print -z "$(cat ~/.config/zshhistory.log | $PECO/peco)"}
|
||||||
zle -N hhstest hhs
|
zle -N hhstest hhs
|
||||||
bindkey ^R hhstest
|
bindkey ^R hhstest
|
||||||
source ~/.config/other/zsh-history-substring-search.zsh
|
|
||||||
|
|
||||||
|
### Experimental ###
|
||||||
|
source ~/.config/other/zsh-history-substring-search.zsh
|
||||||
bindkey '^[[5~' history-substring-search-up
|
bindkey '^[[5~' history-substring-search-up
|
||||||
bindkey '^[[6~' history-substring-search-down
|
bindkey '^[[6~' history-substring-search-down
|
||||||
|
|||||||
Reference in New Issue
Block a user