On Tuesday 14 April 2009, [email protected] wrote: > On Tue, Apr 14, 2009 at 05:27:49PM +0300, Ville Skyttä wrote: > Also, the leading /UUID/ seems to me as superfluous, i.e. why 'sed -ne > > /UUID/s/^UUID=.../p' instead of simply 'sed -ne s/UUID=.../p' ? (Ditto > > for LABEL.) > > I always believed it was a performance gain as it will skip any line > without this pattern and never charge a buffer with more than 5 characters > of a non-matching line but.... I never did tests about that and it's maybe > a myth :[
Oh, ok. Anyway I would find it surprising if it was measurably different in this (/etc/fstab) case. > Also I removed the leading ^ as a fstab line mays begin with blank. > Last doubt : adding a leading ^[^#]* to the regexp as, in this world it may > exist some stupid fstab like : > #UUID=foo > /dev/sda1.... > or > /dev/sda1 .... 0 1 #UUID=blah > > I wish this attachment satisfactory :) Applied with minor changes (leading whitespace taken care of with ^[[:space:]]*, that takes care of comments as well). > A last thing : why the cygwin and solaris COMPREPLY don't use $(compgen -- > $cur) instead of $(grep "^$cur") ? A lot of things currently have that flaw, I have a patch in progress that fixes some of them. Patches obviously welcome ;). I also added a note about this in README's CONTRIBUTING section. _______________________________________________ Bash-completion-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel
