Created
July 12, 2024 13:55
-
-
Save cfstras/2625dba8700b921ed362a992829feb0c to your computer and use it in GitHub Desktop.
Revisions
-
cfstras created this gist
Jul 12, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ # Often-used aliases for common package managers. Add them to your bashrc/zshrc! Never think about which OS you're currently using! Usage: ```bash sea some key words ``` ```bash ins package-1 package-2 package-3 ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ # often used apt-get aliases if [ -x /usr/bin/apt-get ]; then alias ins='sudo apt install' alias sea='sudo apt search' alias update='sudo apt-get -y update && sudo apt-get upgrade' alias apt-history='(zcat /var/log/apt/history.log.*.gz; cat /var/log/apt/history.log) | grep -B1 Commandline' alias apt-hist='(zcat /var/log/apt/history.log.*.gz; cat /var/log/apt/history.log) | egrep "Commandline.* (install|remove)" | cut -c22-' elif [ -x /usr/bin/yum ]; then GRML_NO_APT_ALIASES=1 alias ins='sudo yum install' alias update='sudo yum update' alias yum='sudo yum' elif [ -x /usr/bin/yay ]; then GRML_NO_APT_ALIASES=1 alias ins='yay -S --needed' alias sea='yay -Ss' alias update="yay -Syu" elif [ -x /usr/bin/pacman ]; then alias ins='sudo pacman -S --needed' alias sea='pacman -Ss' alias update="sudo pacman -Syu" elif [ -x /usr/local/bin/brew ] || [ -x /opt/homebrew/bin/brew ]; then function ins() { for prog in "$@"; do if info=$(brew info "$prog" 2>&1); then brew install "$prog" else echo "$info" fi done } alias sea='brew search' alias update='brew update && brew upgrade' fi