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. */ >>>>> rl_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!:{~"; >>>>> /*}*/ >>>>> >>>>> >>>> So that's problem. I don't think @=: need to be treated specially. Any >>>> reason? >>> >>> They are used as word break characters during completion. >>> >>> >> That's the way it's implemented but that does not mean that's reasonable. > > 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 break > so you can complete hostnames more easily, = breaks so you can complete > filenames on the rhs of assignment statements, and : breaks so you can > complete filenames in words that look like $PATH. > > Are we really spending this much time on a cosmetic issue?
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.