[Lunar-commits] CVS: moonbase/utils/lunar-tools/profile.d clad.rc, NONE, 1.1

Auke Kok sofar at lunar-linux.org
Tue Jan 18 13:50:22 UTC 2005


Update of /var/cvs/lunar/moonbase/utils/lunar-tools/profile.d
In directory espresso.foo-projects.org:/home/sofar/active/moonbase/utils/lunar-tools/profile.d

Added Files:
	clad.rc 
Log Message:
cmdline tab completion for clad


--- NEW FILE: clad.rc ---

# Turn on extended globbing
shopt -s extglob

_clad ()
{
    local cur prev
    COMPREPLY=()
    cur=${COMP_WORDS[COMP_CWORD]}
    prev=${COMP_WORDS[COMP_CWORD-1]}

    if [ $COMP_CWORD -eq 1 ] || [ "${prev:0:1}" = "-" ]; then
        COMPREPLY=( $( compgen -W 'create destroy add remove test run bgrun list login logout' $cur ))
    elif [ $COMP_CWORD -eq 2 ]; then
        COMPREPLY=( $( compgen -W "`ls /var/lib/clad`" ))
    else
        COMPREPLY=( $( compgen -W "`cat /var/lib/clad/$prev`" ))
    fi
    return 0
}
complete -F _clad clad




More information about the Lunar-commits mailing list