I'm taking a stab at writing a Bash completion for the first time, and I'm a bit confused about about the two ways of dereferencing Bash arrays (${array[@]} and ${array[*]}).
Here's the relevant chunk of code (it works, by the way, but I would like to understand it better):
_switch()
{
local cur perls
local ROOT=${PERLBREW_ROO...
I'm trying to write a small command launcher application, and would like to use bash's tab completions in my own completion system. I've been able to get a list of completions for general commands using compgen -abck.
However, I would also like to get completions for specific commands: for instance, the input git p should display complet...
Is there any bash_completion script ready for Rails 3?
...
In a bash completion script, suppose COMPREPLY=(aa/ba/ aa/bb/). When the script is invoked, the completion options looks like this to the user:
$ foo aa/b<TAB>
aa/ba/
aa/bb/
However, I want to have a bit more control over how these options are displayed. In particular, I want to show only a substring of each COMPREPLY option to the us...