source: lliurex-maker/trunk/fuentes/new/etc/bash_completion.d/lliurex-maker @ 911

Last change on this file since 911 was 911, checked in by kbut, 5 years ago

add lliurex-maker script

File size: 721 bytes
Line 
1have lliurex-maker &&
2_lliurex_maker()             
3{
4    local cur prev opts base
5    COMPREPLY=()
6    cur="${COMP_WORDS[COMP_CWORD]}"
7    prev="${COMP_WORDS[COMP_CWORD-1]}"
8
9    #
10    #  The basic options we'll complete.
11    #
12    opts="build clean"
13
14
15    #
16    #  Complete the arguments to some of the basic commands.
17    #
18    case "${prev}" in
19        build)
20            local running=$( ls /usr/share/lliurex-maker/configuracions/ | grep -v "common" | tr "\n" " ")
21            COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
22            return 0
23            ;;
24        *)
25        ;;
26    esac
27
28   COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
29   return 0
30}
31[ "$have" ] && complete -F _lliurex_maker lliurex-maker
Note: See TracBrowser for help on using the repository browser.