dotfiles/dot_config/zsh/files/functions.zsh
2023-09-28 12:18:38 +02:00

20 lines
338 B
Bash

pet_select () {
BUFFER=$(pet search --query "$LBUFFER")
CURSOR=$#BUFFER
zle redisplay
}
zle -N pet_select
bindkey '^l' pet_select
pet_add_prev () {
PREV=$(fc -lrn | head -n 1)
sh -c "pet new $(printf %q "$PREV")"
}
run_ranger () {
echo
ranger < $TTY
zle redisplay
}
zle -N run_ranger
bindkey '^f' run_ranger