source: lliurex-mirror/trunk/fuentes/lliurex-mirror-core.install/etc/bash_completion.d/lliurex-mirror @ 246

Last change on this file since 246 was 246, checked in by hectorgh, 5 years ago

adding project files

File size: 904 bytes
Line 
1have lliurex-mirror &&
2_lliurex-mirror()             
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="update_from_ip update_from_custom_dir save_to_custom_dir get_the_last_custom_dir update do_sanity_checks check_and_fix set_architecture_all set_architecture_32 set_architecture_64 is_mirror_32_available is_mirror_64_available"
13
14   #
15    #  Complete the arguments to some of the basic commands.
16    #
17    case "${prev}" in
18        save_to_custom_dir|update_from_custom_dir)
19            local running=$( ls / )
20            COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
21            return 0
22            ;;
23        *)
24        ;;
25    esac
26
27
28
29   COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
30   return 0
31}
32[ "$have" ] && complete -F _lliurex-mirror lliurex-mirror
Note: See TracBrowser for help on using the repository browser.