23 lines
503 B
Plaintext
Raw Normal View History

# FreeBSD kldload completion -*- shell-script -*-
[[ $OSTYPE == *freebsd* ]] || return 1
_kldload()
{
local cur prev words cword
_init_completion || return
local moddir=/modules/
2011-11-09 23:28:11 +02:00
[[ -d $moddir ]] || moddir=/boot/kernel/
compopt -o filenames
2009-10-04 19:42:50 +02:00
COMPREPLY=( $( compgen -f "$moddir$cur" ) )
COMPREPLY=( ${COMPREPLY[@]#$moddir} )
COMPREPLY=( ${COMPREPLY[@]%.ko} )
2009-10-04 19:42:50 +02:00
return 0
2011-04-04 22:14:39 +03:00
} &&
complete -F _kldload kldload
2009-10-04 19:42:50 +02:00
# ex: ts=4 sw=4 et filetype=sh