chore(zsh): rename fzf z function instead of overwriting the original command

This commit is contained in:
Stefan Imhoff
2021-12-11 17:42:29 +01:00
parent a98976a839
commit f8f940b4fe

3
zshrc
View File

@@ -326,8 +326,7 @@ fshow() {
} }
# Search z history with fzf # Search z history with fzf
unalias z 2> /dev/null fz() {
z() {
[ $# -gt 0 ] && _z "$*" && return [ $# -gt 0 ] && _z "$*" && return
cd "$(_z -l 2>&1 | fzf --height 40% --nth 2.. --reverse --inline-info +s --tac --query "${*##-* }" | sed 's/^[0-9,.]* *//')" cd "$(_z -l 2>&1 | fzf --height 40% --nth 2.. --reverse --inline-info +s --tac --query "${*##-* }" | sed 's/^[0-9,.]* *//')"
} }