1
# bash completion for FreeBSD kernel module commands
3
[ $UNAME = FreeBSD ] &&
11
[ -d $moddir ] || moddir=/boot/kernel/
12
_get_comp_words_by_ref cur
15
COMPREPLY=( $( compgen -f "$moddir$cur" ) )
16
COMPREPLY=( ${COMPREPLY[@]#$moddir} )
17
COMPREPLY=( ${COMPREPLY[@]%.ko} )
21
complete -F _kldload kldload
26
_get_comp_words_by_ref cur
27
COMPREPLY=( $( kldstat | \
28
sed -ne "s/^.*[ \t]\{1,\}\($cur[a-z_]\{1,\}\).ko$/\1/p" ) )
30
complete -F _kldunload kldunload
37
# sh-indent-comment: t
38
# indent-tabs-mode: nil
40
# ex: ts=4 sw=4 et filetype=sh