From 626033c750e34fa42e6b81a76bf185f4ee41e0fc Mon Sep 17 00:00:00 2001 From: Guilherme Rugai Freire <41879254+GRFreire@users.noreply.github.com> Date: Sun, 22 Aug 2021 01:18:55 -0300 Subject: [PATCH] zsh: add pacs and apacs alias search and install packages from arch repos and the aur --- .zshrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.zshrc b/.zshrc index 161e032..a6535fc 100644 --- a/.zshrc +++ b/.zshrc @@ -34,6 +34,10 @@ source /usr/share/fzf/key-bindings.zsh # Alias config to manage dotfiles with git alias config="git --git-dir=\$HOME/.dotfiles/ --work-tree=\$HOME" +# Pacman Search +alias pacs="pacman -Slq | fzf --multi --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S" +alias apacs="paru -Slq | fzf --multi --preview 'paru -Si {1}' | xargs -ro paru -S" + # Config/scripts Edit alias ce="echo \"\$(/bin/ls \$HOME/.scripts/bin | sed \"s|^|\$(realpath \$HOME/.scripts/bin/ --relative-to=.)/|\")\n\$((cd \$HOME && config ls-tree -r master --name-only \$HOME) | sed \"s|^|\$(realpath \$HOME --relative-to=.)/|\" | sed 's|^\./||')\" | fzf --info=inline --prompt='Select a file: ' --preview='bat --paging=never --style=plain --color=always {}' | xargs -r \$EDITOR" bindkey -s '^e' 'ce\n'