From 6c18848a903eb3ee06dccd915859ce64195c257c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 18:24:27 +0200 Subject: Adding upstream version 1:2.11. Signed-off-by: Daniel Baumann --- completions/kldload | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 completions/kldload (limited to 'completions/kldload') diff --git a/completions/kldload b/completions/kldload new file mode 100644 index 0000000..f511158 --- /dev/null +++ b/completions/kldload @@ -0,0 +1,21 @@ +# FreeBSD kldload completion -*- shell-script -*- + +[[ $OSTYPE == *freebsd* ]] || return 1 + +_kldload() +{ + local cur prev words cword + _init_completion || return + + local moddir=/modules/ + [[ -d $moddir ]] || moddir=/boot/kernel/ + + compopt -o filenames + COMPREPLY=($(compgen -f "$moddir$cur")) + COMPREPLY=(${COMPREPLY[@]#$moddir}) + COMPREPLY=(${COMPREPLY[@]%.ko}) + +} && + complete -F _kldload kldload + +# ex: filetype=sh -- cgit v1.2.3