Tab Complete with Bash Functions About two years ago I had trouble figuring out how to program bash shell script functions to use tab-completion options. Here is what I learned, hopefully it will help someone out there, someday. How to programming TAB completion into bash functions, programs and other such things. Minimum Requirements Here are the minimum requirements for BASH tab completion. Code: # local can only be used within a function, exclude it if not using a function COMPREPLY=() local cur="${COMP_WORDS[COMP_CWORD]}" local opts="--whatever --tabbing --options --you --want" COMPREPLY=($(compgen -W "${opts}" -- ${cur})) Lastly, you need one more line after this somewhere in the file, usually after your function: complete -F "function_name" -o "default" "function_name" # Replace function_name with your function Example A simple example with the current code: Code: function sd { # local can only be used within a function,...