summaryrefslogtreecommitdiffstats
path: root/completions/portsnap
blob: a2f0a936a44d19f0296f84d0a016cef05d5a4672 (plain)
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
# bash completion for Portsnap                             -*- shell-script -*-

[[ $OSTYPE == *freebsd* ]] || return 1

_portsnap()
{
    local cur prev words cword
    _init_completion || return

    case $prev in
        -d | -p)
            _filedir -d
            return
            ;;
        -l | -f)
            _filedir
            return
            ;;
    esac

    COMPREPLY=($(compgen -W "fetch cron extract update" -- $cur))
} &&
    complete -F _portsnap portsnap

# ex: filetype=sh