<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<STYLE type=text/css>@import url( C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files\scrollbar.css );
</STYLE>

<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.6003" name=GENERATOR><LINK 
href="BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em}" 
rel=stylesheet></HEAD>
<BODY style="FONT-SIZE: 10pt; MARGIN: 10px; FONT-FAMILY: verdana">
<DIV><FONT face=Verdana size=2>
<DIV>hello,everyone!</DIV>
<DIV>&nbsp;</DIV>
<DIV>I read bash_completion, and is confused for below code:</DIV>
<DIV>&nbsp;</DIV>
<DIV>1348&nbsp; &nbsp;&nbsp;&nbsp;# try to allow variable 
completion<BR>1349&nbsp; &nbsp;&nbsp;&nbsp;if [[ "$cur" == ?(\\)\$* ]]; 
then<BR>1350&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;COMPREPLY=( $( compgen -v -P 
'$' -- "${cur#?(\\)$}" ) )<BR>1351&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;return 
0<BR>1352&nbsp; &nbsp;&nbsp;&nbsp;fi</DIV>
<DIV>&nbsp;</DIV>
<DIV>I don't know what's the exact meaning of "?(\\)\$*"</DIV>
<DIV>&nbsp;</DIV>
<DIV>so I try the test below:</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV id=code0>
<OL>
  <LI>$ echo ?(\\)\$*<BR>
  <LI>bash: syntax error near unexpected token `('<BR>
  <LI><BR>
  <LI>$&nbsp;source /etc/bash_completion<BR>
  <LI><BR>
  <LI>$ echo ?(\\)\$*<BR>
  <LI>?(\)$*</LI></OL></DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>can you kindly tell me what's the difference from&nbsp; before "source 
/etc/bash_completion" to after "source /etc/bash_completion"&nbsp; for 
"?(\\)\$*"?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you for your kindly reply!</FONT></DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; 
<DIV><FONT face=Verdana size=2>best regards!</FONT></DIV>
<DIV>&nbsp;</DIV></DIV>
<DIV align=left><FONT face=Verdana color=#c0c0c0 size=2>2010-08-24 
</FONT></DIV><FONT face=Verdana size=2>
<HR style="WIDTH: 122px; HEIGHT: 2px" align=left SIZE=2>

<DIV><FONT face=Verdana color=#c0c0c0 size=2><SPAN>zhengkarl</SPAN> 
</FONT></DIV></FONT></BODY></HTML>