diff options
author | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2019-08-07 09:17:13 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2019-08-07 09:17:13 -0300 |
commit | 5732da2af736c40cf693354485446ab4867ecb4d (patch) | |
tree | 76d76cdfa16ca62d20fb109da13895ec64fff110 /completions/wol | |
parent | 9cd22d1df8f0f5b554858471c86faa9f37b8fed4 (diff) | |
download | bash-completion-5732da2af736c40cf693354485446ab4867ecb4d.tar.gz |
New upstream version 2.9upstream/2.9
Diffstat (limited to 'completions/wol')
-rw-r--r-- | completions/wol | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/completions/wol b/completions/wol index 1ce25b05..0222b24d 100644 --- a/completions/wol +++ b/completions/wol @@ -6,20 +6,20 @@ _wol() _init_completion -s -n : || return case $prev in - -V|--version|--help|-p|--port|--passwd|-w|--wait) + --version|--help|--port|--passwd|--wait|-!(-*)[Vpw]) return ;; - -h|--host|-i|--ipaddr) + --host|--ipaddr|-!(-*)[hi]) # Broadcast addresses local PATH=$PATH:/sbin - COMPREPLY=( $( { ip addr show || ifconfig -a; } 2>/dev/null | \ + COMPREPLY=( $({ ip addr show || ifconfig -a; } 2>/dev/null | \ command sed -ne 's/.*[[:space:]]Bcast:\([^[:space:]]*\).*/\1/p' -ne \ 's/.*inet.*[[:space:]]brd[[:space:]]\([^[:space:]]*\).*/\1/p' -ne \ - 's/.*[[:space:]]broadcast[[:space:]]\{1,\}\([^[:space:]]*\).*/\1/p' ) ) + 's/.*[[:space:]]broadcast[[:space:]]\{1,\}\([^[:space:]]*\).*/\1/p') ) _known_hosts_real -- "$cur" return ;; - -f|--file) + --file|-!(-*)f) _filedir return ;; @@ -28,7 +28,7 @@ _wol() $split && return if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) + COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") ) [[ $COMPREPLY == *= ]] && compopt -o nospace return fi |