Wiki > Custom Tab Completion
Create custom tab completion profiles for your applications
Bash
-
Create the .bash_completion file.
touch ~/.bash_completion
-
Create the .bash_completion.d directory.
mkdir ~/.bash_completion.d
-
Edit ~/.bash_completion and enter the text below to have it scan ~/.bash_completion.d/ for completion data.
nano ~/.bash_completion
# Add each completion script in the bash_completion.d directory for file in ~/.bash_completion.d/* do if [[ ${file##*/} != @(*~|*.bak) ]]; then # Does not seem to be a forgotten backup file if [ \( -f $file -o -h $file \) -a -r $file ]; then # The file is a regular file or a symbolic link, and is # readable by this script (for the user running the script). # That is good enough for us - source the file . $file fi fi done
-
Save the file with
Ctrl+x
followed byy
andEnter
when prompted to overwrite the existing file. -
Put your tab completion data in ~/.bash_completion.d/<App>
For example: ~/.bash_completion.d/rclone -
Restart your shell or source ~/.bash_completion for the new tab completion data to take effect.
source ~/.bash_completion
Zsh
rclone
rclone offers a tool for creating tab completion data
Bash
Create the tab completion data into your ~/.bash_completion.d/ directory
rclone genautocomplete bash ~/.bash_completion.d/rclone