[Bash-completion-devel] mount label|uuid

Ville Skyttä ville.skytta at iki.fi
Tue Apr 14 14:27:49 UTC 2009

On Tuesday 14 April 2009, gibboris at gmail.com wrote:
> Hi,
> Modified as suggested, tested (but not "heavily") and it seems to work.
> - I postulated uuidgen always output lower-case hex

Why make such assumptions and assumptions in general about the UUID length? 
Why not just look for whitespace like in the suggested:

> > COMPREPLY=( $( compgen -W '$( sed -ne "s/^UUID=\([^[:space:]]*\).*/\1/p"
> > /etc/fstab )' -- $cur ) )

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 

More information about the Bash-completion-devel mailing list