On Sunday 12 April 2009, [email protected] wrote: > COMPREPLY=( $( sed -n "/UUID/s/^UUID=\($cur[0-9a-f-]\{,36\}\).*/\1/Ip" /etc/fstab ) )
I think this would be better put as: COMPREPLY=( $( compgen -W '$( sed -ne "s/^UUID=\([^[:space:]]*\).*/\1/p" /etc/fstab )' -- $cur ) ) "compgen -W ... -- $cur" is safer against unusual characters in $cur, and "I" in sed's s///I only works with GNU sed as far as I know. > COMPREPLY=( $( sed -n "/LABEL/s/^LABEL=\($cur[0-9a-z_]*\).*/\1/Ip" /etc/fstab ) ) Ditto here: COMPREPLY=( $( compgen -W '$( sed -ne "s/^LABEL=\([^[:space:]]*\).*/\1/p" /etc/fstab )' -- $cur ) ) Could you test these changes and submit a new patch if they work for you? _______________________________________________ Bash-completion-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel
