Skip to content

Commit 35017d2

Browse files
committed
fix(kldunload): remove unused -X option
The option `-X arg` for `compgen` is specified twice, but only the latter takes effect. Also, `-X kernel` excludes the word `kernel` but the latter `-X '!*.ko'` also excludes the word `kernel` because it only leaves the words matches the pattern `*.ko`. Thus, we can just filter the words by `-X '!*.ko'`.
1 parent 0cd3bce commit 35017d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

completions/kldunload

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ _comp_cmd_kldunload()
77
local cur prev words cword comp_args
88
_comp_initialize -- "$@" || return
99

10-
COMPREPLY=($(compgen -W '$(kldstat)' -X 'kernel' -X '!*.ko' -- "$cur"))
10+
COMPREPLY=($(compgen -W '$(kldstat)' -X '!*.ko' -- "$cur"))
1111
COMPREPLY=(${COMPREPLY[@]%.ko})
1212
} &&
1313
complete -F _comp_cmd_kldunload kldunload

0 commit comments

Comments
 (0)