sysctl(8) completion, modified from code sent in by Jonas Davidsson

<aphex@bredband.net>.
This commit is contained in:
ianmacd 2006-02-25 12:02:25 +00:00
parent 2eba4eecc6
commit 9f2d303f6d

View File

@ -1,7 +1,7 @@
# bash_completion - programmable completion functions for bash 3.x # bash_completion - programmable completion functions for bash 3.x
# (backwards compatible with bash 2.05b) # (backwards compatible with bash 2.05b)
# #
# $Id: bash_completion,v 1.858 2006/02/25 11:55:56 ianmacd Exp $ # $Id: bash_completion,v 1.859 2006/02/25 13:02:25 ianmacd Exp $
# #
# Copyright (C) Ian Macdonald <ian@caliban.org> # Copyright (C) Ian Macdonald <ian@caliban.org>
# #
@ -8627,6 +8627,22 @@ _vncviewer()
} && } &&
complete -F _vncviewer vncviewer complete -F _vncviewer vncviewer
# sysctl(8) completion
#
have sysctl &&
_sysctl()
{
local cur
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $( compgen -W "$(sysctl -N -a 2>/dev/null)" -- $cur ) )
return 0
} &&
complete -F _sysctl sysctl
_filedir_xspec() _filedir_xspec()
{ {
local IFS cur xspec local IFS cur xspec