16 lines
368 B
Bash
16 lines
368 B
Bash
# FreeBSD kldunload completion -*- shell-script -*-
|
|
|
|
[[ $OSTYPE == *freebsd* ]] || return 1
|
|
|
|
_kldunload()
|
|
{
|
|
local cur prev words cword
|
|
_init_completion || return
|
|
|
|
COMPREPLY=( $( kldstat | \
|
|
sed -ne "s/^.*[ \t]\{1,\}\($cur[a-z_]\{1,\}\).ko$/\1/p" ) )
|
|
} &&
|
|
complete -F _kldunload kldunload
|
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|