Add completions for FreeBSD's kldload

This commit is contained in:
Mahmoud Al-Qudsi 2018-06-18 21:01:05 -05:00
parent 1ab9fe663f
commit 5061f1666b
2 changed files with 10 additions and 0 deletions

View file

@ -67,6 +67,7 @@ This section is for changes merged to the `major` branch that are not also merge
- `configure` (autoconf only)
- `j` (autojump #4344)
- `jhipster` (#4472)
- `kldload`
- `meson`
- `ngrok` (#4642)
- `optipng`

View file

@ -0,0 +1,9 @@
# Completions for the FreeBSD `kldload` kernel module load utility
# Only attempt to match a local file if there isn't a match in /boot/kernel,
# as odds are that is the desired source.
complete -c kldload -xa "(
set results (find /boot/kernel -depth 1 -iname (commandline -ct)'*.ko' | sed 's@.*/@@g;s/\.ko//');
set -q results[1]; and printf '%s\n' $results;
or __fish_complete_suffix .ko
)"