sh: Unify fzf function names, add fzfman function
`fzfman` will gather all manpage topics and display them in a fzf list to choose from. Selection will open the corresponding manpage. Other fzf- functions have been standardized in their naming scheme: fzf and the function without any spaces, e.g. `fzfhistory`, `fzfyay`, `fzfyayrns`.
This commit is contained in:
parent
d91adbfc13
commit
b280e4f9ae
1 changed files with 7 additions and 3 deletions
|
@ -42,12 +42,16 @@ alias myip="curl -s icanhazip.com"
|
||||||
# fzf
|
# fzf
|
||||||
if exist fzf; then
|
if exist fzf; then
|
||||||
# Display fuzzy-searchable history
|
# Display fuzzy-searchable history
|
||||||
alias fzf_history="history | fzf --tac --height 20"
|
alias fzfhistory="history | fzf --tac --height 20"
|
||||||
|
fzfman() {
|
||||||
|
man "$(apropos --long "$1" | fzf | awk '{print $2, $1}' | tr -d '()')"
|
||||||
|
}
|
||||||
|
|
||||||
# Fuzzy search packages to install
|
# Fuzzy search packages to install
|
||||||
if exist yay; then
|
if exist yay; then
|
||||||
alias fzf_yay="yay -Slq | fzf -m --preview 'yay -Si {1}' | xargs -ro yay -S"
|
alias fzfyay="yay -Slq | fzf -m --preview 'yay -Si {1}' | xargs -ro yay -S"
|
||||||
# Fuzzy uninstall packages
|
# Fuzzy uninstall packages
|
||||||
alias fzf_yayrns="yay -Qeq | fzf -m --preview 'yay -Qi {1}' | xargs -ro yay -Rns"
|
alias fzfyayrns="yay -Qeq | fzf -m --preview 'yay -Qi {1}' | xargs -ro yay -Rns"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue