Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias ai="sudo apt install"
- alias ar="sudo apt remove"
- alias as="sudo apt search"
- 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 ai
- complete -F getInstalledPa ckages ar
- complete -F getAptCache as
Advertisement
Add Comment
Please, Sign In to add comment