From b74d53761afb48e5e0948b70e7202a1c1cda4897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Thu, 1 May 2014 18:30:20 +0300 Subject: [PATCH] nslookup: complete on hosts (Alioth: #314673) --- completions/nslookup | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/completions/nslookup b/completions/nslookup index 88af1d5b..59899456 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