Let's say I have a simple function serving as an alias to cd.
c(){ cd "$@"; }
How can I get the original autocompletion of cd work for my new function? Note that cd only autocompletes directory names, not simple file names.
I know about the complete command, but where exactly is the autocompletion function used by cd located?
Thanks for help!
Look for /etc/bash_completion or /etc/bash_completion.d for the system-wide defaults.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With