On Mon, Feb 21, 2011 at 9:21 AM, Chet Ramey <chet.ra...@case.edu> wrote:
> On 2/18/11 6:52 AM, Clark J. Wang wrote: > > > > > Sth was wrong for my testing. I removed @ from COMP_WORDBREAKS but > > afterwards one bind command (bind "set bell-style none") added @ back. > > I can't reproduce this: > > $ echo $BASH_VERSION > 4.2.0(22)-maint > $ echo ${COMP_WORDBREAKS} > "'@><=;|&(: > $ COMP_WORDBREAKS=${COMP_WORDBREAKS/@/} > $ echo ${COMP_WORDBREAKS} > "'><=;|&(: > $ bind 'set bell-style none' > $ echo ${COMP_WORDBREAKS} > "'><=;|&(: > > I just tried with a very simple ~/.bashrc: COMP_WORDBREAKS=${COMP_WORDBREAKS//[:@]/} printf '%q\n' "$COMP_WORDBREAKS" bind "set bell-style none" printf '%q\n' "$COMP_WORDBREAKS" When bash starts, I can see: $' \t\n"\'><=;|&(' $'@ \t\n"\'><=;|&(' bash-4.2# And other bind command like bind "set completion-ignore-case on" can also reproduce. Note that I tested on Debian 6.0 (i686). > Bash hostname completion is independent of the more-recently-added > programmable completion, which I suspect you might be using. > > The default bash completion breaks words at @ and attempts to complete > hostnames from its own internal list. Look at the description of > HOSTFILE and the readline `complete' function in the manual page. > > There is a shell option (`hostcomplete') to turn this on and off. > > Chet > > -- > ``The lyf so short, the craft so long to lerne.'' - Chaucer > ``Ars longa, vita brevis'' - Hippocrates > Chet Ramey, ITS, CWRU c...@case.edu > http://cnswww.cns.cwru.edu/~chet/ > -- Clark J. Wang