1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-12-22 15:21:30 +01:00

zsh: add pacbins and rexplain commands

This commit is contained in:
bretello 2021-12-08 23:55:41 +01:00
parent d58d4232e8
commit 8236f71189
Signed by: brethil
GPG Key ID: 876AAC6290170FE7

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"