File: bashcompletion

package info (click to toggle)
neat 2.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 4,108 kB
  • sloc: f90: 7,385; python: 211; makefile: 78; sh: 64
file content (58 lines) | stat: -rwxr-xr-x 1,977 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# neat(1) completion 
# rw@nebulousresearch.org

_neat() 
{
    local cur prev words cword opts helium_options icf_options extinction_options verbosity_options
    _init_completion || return
    COMPREPLY=()

    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    opts="-i --input -u --uncertainties -n --n-iterations -e --extinction-law -c -nelow -nemed -nehigh -telow -temed -tehigh -he --helium-data -icf --ionisation-correction-scheme -v --verbosity -id --identify -idc --identify-confirm -rp -sr --subtract-recombination -cf --configuration-file --citation -o --output-dir -of --output-format"

    COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )

    case "${prev}" in
        --helium-data|-he)
            helium_options="P12 S96"
            COMPREPLY=( $( compgen -W "$helium_options" -- "$cur" ) )
            return 0
            ;;
	--ionisation-correction-scheme|-icf)
	    icf_options="DI14 DI14mod KB94 PT92"
	    COMPREPLY=( $( compgen -W "$icf_options" -- "$cur" ) )
            return 0
            ;;
        --extinction-law|-e)
            extinction_options="How Fitz CCM LMC SMC"
            COMPREPLY=( $( compgen -W "$extinction_options" -- "$cur" ) )
            return 0
            ;;
        --verbosity|-v)
            verbosity_options="1 2 3"
            COMPREPLY=( $( compgen -W "$verbosity_options" -- "$cur" ) )
            return 0
            ;;
        --output-format|-of)
            format_options="fits text"
            COMPREPLY=( $( compgen -W "$format_options" -- "$cur" ) )
            return 0
            ;;
        --input|-i|--configuration-file|-cf)
            COMPREPLY=()
            _filedir
            return 0
            ;;
        --output-dir|-o)
            _filedir -d
            return 0
            ;;
        -c|-nehigh|-nelow|-nemed|-n|--n-iterations|-tehigh|-telow|-temed|--citation)
            COMPREPLY=()
            return 0
            ;;
    esac

}
complete -F _neat neat