[Bash-completion-commits] [bash-completion] 01/01: nslookup: complete on hosts (Alioth: #314673)

Ville Skyttä scop-guest at moszumanska.debian.org
Thu May 1 15:31:00 UTC 2014


This is an automated email from the git hooks/post-receive script.

scop-guest pushed a commit to branch master
in repository bash-completion.

commit b74d53761afb48e5e0948b70e7202a1c1cda4897
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Thu May 1 18:30:20 2014 +0300

    nslookup: complete on hosts (Alioth: #314673)
---
 completions/nslookup | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/completions/nslookup b/completions/nslookup
index 88af1d5..5989945 100644
--- a/completions/nslookup
+++ b/completions/nslookup
@@ -39,6 +39,14 @@ _nslookup()
             -domain= -search -nosearch -port= -querytype= -recurse -norecurse
             -retry= -timeout= -vc -novc -fail -nofail' -- "$cur" ) )
         [[ $COMPREPLY == *= ]] && compopt -o nospace
+        return
+    fi
+
+    local args
+    _count_args =
+    if [[ $args -le 2 ]]; then
+        _known_hosts_real "$cur"
+        [[ $args -eq 1 && $cur == @(|-) ]] && COMPREPLY+=( - )
     fi
 } &&
 complete -F _nslookup nslookup

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bash-completion/bash-completion.git



More information about the Bash-completion-commits mailing list