Skip to content

Bash autocomplete for install/uninstall alias for apt (debian based linux)

Notifications You must be signed in to change notification settings

AvyChanna/One-Word-Apt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

One-Word-Apt

Bash autocomplete for install/uninstall alias for apt package manager

(For Easily installing/removing packages on Debian based Linux (like Ubuntu) )

Installation

Firstly, add alias for installing and removing packages into your .bash_alias file.

#Add alias to file
#ai is short for 'install'
#au is short for 'uninstall'
echo "alias ai='sudo apt install'" >> ~/.bash_alias
echo "alias au='sudo apt remove'" >> ~/.bash_alias

Then copy the files named 'get' and 'remove' into /etc/bash_completion.d folder. (You can also copy it to /usr/share/bash-completion/completions/ folder.) Chmod these files to [-rw-r--r--] (644) (which is usually the default for most system files)

Assuming that Working Directory of your terminal is the root folder of this cloned repository, the following should word fine -

#Copy Files
sudo cp ai /etc/bash_completion.d/
sudo cp au /etc/bash_completion.d/
#Set Permissions
sudo chmod 644 /etc/bash_completion.d/ai
sudo chmod 644 /etc/bash_completion.d/au

Now, open up a terminal and test this command (just download any package and then try to remove it)

Usage

Just use it as an abbrevation of normal apt commands.

ai PACKAGE_NAME #install a package
#just like sudo apt install PACKAGE_NAME
au PACKAGE_NAME #remove a package
This can also use all arguments that are supported by apt (like -d,-s,-t,--purge).

About

Bash autocomplete for install/uninstall alias for apt (debian based linux)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages