Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # author: s4bba7
- # ver: 1.1 (updated on 19.06.2016)
- # Just paste it to .bashrc and execute `source .bashrc` or restart OS ;)
- # Of course you may change aliases as you like.
- alias apti="sudo apt install"
- alias apta="sudo apt-get autoremove"
- alias aptr="sudo apt remove --auto-remove"
- alias apts="sudo apt search"
- alias aptu="sudo apt update && sudo apt upgrade"
- getAptCache() {
- mapfile -t COMPREPLY < <(apt-cache --no-generate pkgnames "$2");
- }
- getInstalledPackages() {
- mapfile -t COMPREPLY < <(dpkg --get-selections | grep -v deinstall | cut -f 1 | grep "$2");
- }
- complete -F getAptCache apti
- complete -F getInstalledPackages aptr
- complete -F getAptCache apts
Advertisement
Add Comment
Please, Sign In to add comment