Fixed up zsh (but only for linux, cause macos sux)
This commit is contained in:
parent
3130ff5b87
commit
9b7b09183c
1 changed files with 2 additions and 7 deletions
|
@ -155,14 +155,9 @@ else
|
|||
fi
|
||||
|
||||
function fzf_hist() {
|
||||
local sed_cmd
|
||||
if [[ $(uname -s) == "Darwin" ]]; then
|
||||
sed_cmd='sed -E'
|
||||
else
|
||||
sed_cmd='sed -r'
|
||||
fi
|
||||
print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | $($sed_cmd 's/ *[0-9]*\*? *//') | ${sed_cmd} 's/\\/\\\\/g')
|
||||
print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed -r 's/ *[0-9]*\*? *//' | sed -r 's/\\/\\\\/g')
|
||||
}
|
||||
bindkey -s "\C-r" "\eifzf_hist\n"
|
||||
|
||||
export PATH="$PATH:$HOME/.anyenv/bin"
|
||||
eval "$(anyenv init -)"
|
||||
|
|
Loading…
Add table
Reference in a new issue