[Bash-completion-devel] ask for bash_completion vars

zhengkarl zhengkarl at gmail.com
Tue Aug 24 05:21:02 UTC 2010


hello,everyone!

I read bash_completion, and is confused for below code:

1348     # try to allow variable completion
1349     if [[ "$cur" == ?(\\)\$* ]]; then
1350         COMPREPLY=( $( compgen -v -P '$' -- "${cur#?(\\)$}" ) )
1351         return 0
1352     fi

I don't know what's the exact meaning of "?(\\)\$*"

so I try the test below:

$ echo ?(\\)\$*

bash: syntax error near unexpected token `('



$ source /etc/bash_completion



$ echo ?(\\)\$*

?(\)$*

can you kindly tell me what's the difference from  before "source /etc/bash_completion" to after "source /etc/bash_completion"  for "?(\\)\$*"?

Thank you for your kindly reply!

  
best regards!

2010-08-24 



zhengkarl 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20100824/61a929d5/attachment.htm>


More information about the Bash-completion-devel mailing list