summaryrefslogtreecommitdiffstats
path: root/completions/kldunload
blob: 2e12282c844538025eb3f9bebbbcb1159ddc8861 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# FreeBSD kldunload completion                             -*- shell-script -*-

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

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

    COMPREPLY=($(compgen -W '$(kldstat)' -X 'kernel' -X '!*.ko' -- "$cur"))
    COMPREPLY=(${COMPREPLY[@]%.ko})
} &&
    complete -F _kldunload kldunload

# ex: filetype=sh