Move fzf functions to functions file
Signed-off-by: Marko Korhonen <marko.korhonen@reekynet.com>
This commit is contained in:
parent
61cd310b4a
commit
677da6b5bd
|
@ -18,12 +18,6 @@ export FZF_DEFAULT_COMMAND='rg --files --hidden 2>/dev/null'
|
||||||
export FZF_COMPLETION_TRIGGER='**'
|
export FZF_COMPLETION_TRIGGER='**'
|
||||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||||
export FZF_ALT_C_COMMAND='rg --hidden --files --null --sort path 2>/dev/null | xargs -0 dirname | uniq'
|
export FZF_ALT_C_COMMAND='rg --hidden --files --null --sort path 2>/dev/null | xargs -0 dirname | uniq'
|
||||||
_fzf_compgen_dir() {
|
|
||||||
rg --hidden --files --null --sort path 2>/dev/null | xargs -0 dirname | uniq
|
|
||||||
}
|
|
||||||
_fzf_compgen_path() {
|
|
||||||
rg --files --hidden 2>/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
# use lesspipe with less
|
# use lesspipe with less
|
||||||
export LESSOPEN="|lesspipe.sh %s"
|
export LESSOPEN="|lesspipe.sh %s"
|
||||||
|
|
|
@ -16,13 +16,20 @@ gpush() { git push $@ }
|
||||||
# Syntax highlighting cat
|
# Syntax highlighting cat
|
||||||
cat() { nvimpager -c $@ }
|
cat() { nvimpager -c $@ }
|
||||||
|
|
||||||
|
|
||||||
rip() {
|
rip() {
|
||||||
abcde
|
abcde
|
||||||
printf "Ripping done. Importing to library"
|
printf "Ripping done. Importing to library"
|
||||||
beet import ~/Documents/Rip/flac/*
|
beet import ~/Documents/Rip/flac/*
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# make fzf zsh plugin use ripgrep
|
||||||
|
_fzf_compgen_dir() {
|
||||||
|
rg --hidden --files --null --sort path "$1" 2>/dev/null | xargs -0 dirname | uniq
|
||||||
|
}
|
||||||
|
_fzf_compgen_path() {
|
||||||
|
rg --files --hidden "$1" 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
# search and install packages with fzf
|
# search and install packages with fzf
|
||||||
yi() {
|
yi() {
|
||||||
SELECTED_PKGS="$(yay -Slq | fzf --header='Install packages' -m --preview 'yay -Si {1}')"
|
SELECTED_PKGS="$(yay -Slq | fzf --header='Install packages' -m --preview 'yay -Si {1}')"
|
||||||
|
|
Loading…
Reference in a new issue