On Sat, 05 Nov 2011 20:22:32 +0200
Ville Skyttä <ville.sky...@iki.fi> wrote:

> On 11/05/2011 06:48 PM, Igor Murzov wrote:
> > -            [ -r $i ] && config+=( "$i" )
> > +            [ -r "$i" ] && config+=( "$i" )
> 
> Related to the above, I've had the intention to suggest that we apply a
> policy of always using [[ instead of [.  It doesn't suffer from
> whitespace problems like the above

That's not true. Double brackets still need quotes:

--------------------------------------
$ x="a\ b"
$ y="a\ bc"
$ [[ $y == $x* ]] && echo "[$x] is prefix of [$y]"
$ [[ "$y" == "$x"* ]] && echo "[$x] is prefix of [$y]"
[a\ b] is prefix of [a\ bc]
--------------------------------------


-- Igor

_______________________________________________
Bash-completion-devel mailing list
Bash-completion-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel

Reply via email to