Re: Why escape char `:' with `\' when auto completing filenames?

2011-03-10 Thread Chet Ramey
On 2/20/11 10:11 PM, Clark J. Wang wrote: 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\'=;|('

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-20 Thread Chet Ramey
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} '@=;|(: $

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-20 Thread Clark J. Wang
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

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-20 Thread Clark J. Wang
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

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-18 Thread Maarten Billemont
On 17 Feb 2011, at 23:02, Chet Ramey wrote: Clark J. Wang dearv...@gmail.com writes: I think char `:' is not special in bash. $ printf %q\n $COMP_WORDBREAKS $' \t\n\'=;|(:' I don't think that explain the issue. /* characters that need to be quoted when appearing in filenames.

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-18 Thread Andreas Schwab
Maarten Billemont lhun...@gmail.com writes: Why are we escaping all word break characters? rm file:name and rm file\:name are effectively identical, I'm not sure I see the need for escaping it. How do you differentiate between completing file:name and completing file:name? Andreas. --

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-18 Thread Clark J. Wang
On Fri, Feb 18, 2011 at 5:38 PM, Andreas Schwab sch...@linux-m68k.orgwrote: Maarten Billemont lhun...@gmail.com writes: Why are we escaping all word break characters? rm file:name and rm file\:name are effectively identical, I'm not sure I see the need for escaping it. How do you

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-18 Thread Andreas Schwab
Clark J. Wang dearv...@gmail.com writes: On Fri, Feb 18, 2011 at 5:38 PM, Andreas Schwab sch...@linux-m68k.orgwrote: Maarten Billemont lhun...@gmail.com writes: Why are we escaping all word break characters? rm file:name and rm file\:name are effectively identical, I'm not sure I see the

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-18 Thread Clark J. Wang
On Fri, Feb 18, 2011 at 6:36 PM, Andreas Schwab sch...@linux-m68k.orgwrote: Clark J. Wang dearv...@gmail.com writes: On Fri, Feb 18, 2011 at 5:38 PM, Andreas Schwab sch...@linux-m68k.org wrote: Maarten Billemont lhun...@gmail.com writes: Why are we escaping all word break

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-18 Thread Pierre Gaston
On Fri, Feb 18, 2011 at 12:17 PM, Clark J. Wang dearv...@gmail.com wrote: On Fri, Feb 18, 2011 at 5:38 PM, Andreas Schwab sch...@linux-m68k.org wrote: Maarten Billemont lhun...@gmail.com writes: Why are we escaping all word break characters? rm file:name and rm file\:name are

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-18 Thread Andreas Schwab
Clark J. Wang dearv...@gmail.com writes: On Fri, Feb 18, 2011 at 6:36 PM, Andreas Schwab sch...@linux-m68k.orgwrote: Clark J. Wang dearv...@gmail.com writes: On Fri, Feb 18, 2011 at 5:38 PM, Andreas Schwab sch...@linux-m68k.org wrote: Maarten Billemont lhun...@gmail.com writes:

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-18 Thread Clark J. Wang
On Fri, Feb 18, 2011 at 6:21 PM, Clark J. Wang dearv...@gmail.com wrote: On Fri, Feb 18, 2011 at 6:02 AM, Chet Ramey chet.ra...@case.edu wrote: For pete's sake. If you don't think they should be word break characters, modify the value of COMP_WORDBREAKS. For the record, @ causes a word

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-18 Thread Clark J. Wang
On Fri, Feb 18, 2011 at 6:48 PM, Pierre Gaston pierre.gas...@gmail.comwrote: On Fri, Feb 18, 2011 at 12:17 PM, Clark J. Wang dearv...@gmail.comwrote: On Fri, Feb 18, 2011 at 5:38 PM, Andreas Schwab sch...@linux-m68k.org wrote: Maarten Billemont lhun...@gmail.com writes: Why are we

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-17 Thread Andreas Schwab
Clark J. Wang dearv...@gmail.com writes: I think char `:' is not special in bash. $ printf %q\n $COMP_WORDBREAKS $' \t\n\'=;|(:' Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 And now for something completely

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-17 Thread Clark J. Wang
On Thu, Feb 17, 2011 at 5:00 PM, Andreas Schwab sch...@linux-m68k.orgwrote: Clark J. Wang dearv...@gmail.com writes: I think char `:' is not special in bash. $ printf %q\n $COMP_WORDBREAKS $' \t\n\'=;|(:' I don't think that explain the issue. Try like this (tested with 4.2): #

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-17 Thread Andreas Schwab
Clark J. Wang dearv...@gmail.com writes: On Thu, Feb 17, 2011 at 5:00 PM, Andreas Schwab sch...@linux-m68k.orgwrote: Clark J. Wang dearv...@gmail.com writes: I think char `:' is not special in bash. $ printf %q\n $COMP_WORDBREAKS $' \t\n\'=;|(:' I don't think that explain the issue.

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-17 Thread Clark J. Wang
On Thu, Feb 17, 2011 at 6:19 PM, Andreas Schwab sch...@linux-m68k.orgwrote: Clark J. Wang dearv...@gmail.com writes: On Thu, Feb 17, 2011 at 5:00 PM, Andreas Schwab sch...@linux-m68k.org wrote: Clark J. Wang dearv...@gmail.com writes: I think char `:' is not special in bash. $

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-17 Thread Clark J. Wang
On Thu, Feb 17, 2011 at 9:10 PM, Andreas Schwab sch...@linux-m68k.orgwrote: Clark J. Wang dearv...@gmail.com writes: On Thu, Feb 17, 2011 at 6:19 PM, Andreas Schwab sch...@linux-m68k.org wrote: Clark J. Wang dearv...@gmail.com writes: On Thu, Feb 17, 2011 at 5:00 PM, Andreas Schwab

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-17 Thread Andreas Schwab
Clark J. Wang dearv...@gmail.com writes: That's the way it's implemented but that does not mean that's reasonable. So how do you suggest to solve that? Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 And now for

Re: Why escape char `:' with `\' when auto completing filenames?

2011-02-17 Thread Chet Ramey
On 2/17/11 10:03 AM, Clark J. Wang wrote: Clark J. Wang dearv...@gmail.com writes: I think char `:' is not special in bash. $ printf %q\n $COMP_WORDBREAKS $' \t\n\'=;|(:' I don't think that explain the issue. /* characters that need to be quoted when appearing in filenames. */