zsh: add pacbins and rexplain commands

pull/6/head
bretello 2021-12-08 23:55:41 +01:00
parent d58d4232e8
commit 8236f71189
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
1 changed files with 14 additions and 0 deletions

View File

@ -301,6 +301,20 @@ git-fixup() {
git -c sequence.editor=true rebase --interactive --autosquash $1^
}
if command -v pacman &>/dev/null ; then
compdef _pacman_completions_installed_packages pacbins
pacbins() {
pacman -Ql $1 | sed -n -e 's/.*\/bin\///p' | tail -n +2
}
fi
if command -v rustc &>/dev/null
then
rexplain() {
rustc --explain $@ | bat --language=rust -
}
fi
# dotfiles user functions
if [[ -f $HOME/.dotfiles_functions ]]; then
source "$HOME/.dotfiles_functions"