On Thu, 2008-07-24 at 17:04 +0200, [EMAIL PROTECTED] wrote:
> # HG changeset patch
> # User Raphael Pinson <[EMAIL PROTECTED]>
> # Date 1216911887 -7200
> # Node ID 26d9cf6f08a155818cab92eb1275a932a017d19b
> # Parent  ae394e5c16338ed8622274199c4ad5900fff20b8
> Add bash_completion script for augtool

Nice.

> diff -r ae394e5c1633 -r 26d9cf6f08a1 augeas.bash_completion
> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
> +++ b/augeas.bash_completion  Thu Jul 24 17:04:47 2008 +0200

> +              case $cur in 
> +                 /augeas*)
> +                       files=$( find ${rootdir}/${cur##/augeas}*  -maxdepth 
> 1 2>/dev/null | sed -e "[EMAIL PROTECTED]@/[EMAIL PROTECTED]" | sed -re 
> "s@/+@/@g" )
> +                    COMPREPLY=( $( compgen -W "${files}" -- $cur ) )
> +                    ;;
> +                 /files*)
> +                       files=$( find ${rootdir}/${cur##/files}*  -maxdepth 1 
> 2>/dev/null | sed -e "[EMAIL PROTECTED]@/[EMAIL PROTECTED]" | sed -re 
> "s@/+@/@g" )
> +                    COMPREPLY=( $( compgen -W "${files}" -- "$cur" ) )
> +                    ;;

This doesn't seem right to me .. why do you look into the filesystem for
possible completions ? Shouldn't you complete on the output of 'augtool
ls $cur' ?

> +
> +[ "${have:-}" ] && complete -F _augtool $filenames augtool

>From looking at my /etc/bash_completion, it looks like this line should
be

        have augtool && complete -F _augtool $filenames augtool
        
David


_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to