You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that the last argument to complete is the name of the script you want to add autocompletion to. All you need to do is to add your autocomplete script to ~/.bashrc or /etc/bash_completion.d as:
Example: https://unix.stackexchange.com/a/291867/22180
Here is basic guide.
Lets have an example of script called
admin.sh
to which you would like to have autocomplete working.Note option
shortlist
. Calling script with this option will print out all possible options for this script.And here you have the
autocomplete.sh
script:Note that the last argument to complete is the name of the script you want to add autocompletion to. All you need to do is to add your autocomplete script to
~/.bashrc
or/etc/bash_completion.d
as:Finally, make them executable:
Source: https://askubuntu.com/a/483149/24155
The text was updated successfully, but these errors were encountered: