[Bash-completion-devel] [bash-completion-Bugs][314673] Please add host completion to 'host' and 'nslookup'

bash-completion-bugs at alioth.debian.org bash-completion-bugs at alioth.debian.org
Wed Apr 30 23:34:24 UTC 2014


bash-completion-Bugs item #314673 was changed at 2014-05-01 11:34 by Dan Wallis
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=314673&group_id=100114

Status: Open
Priority: 3
Submitted By: Dan Wallis (fredden-guest)
Assigned to: Nobody (None)
Summary: Please add host completion to 'host' and 'nslookup' 
Distribution: Debian
Originally reported in: None
Milestone: None
Status: None
Original bug number: 


Initial Comment:
It's frustrated me for a while now that 'host' doesn't complete like 'ping' and 'dig' and 'ssh' do. The following patch fixes that. Please can this be included in Jessie?


fredden at gordo:/usr/share/bash-completion/completions$ ls -lh host nslookup
lrwxrwxrwx 1 root root    8 Jun 18  2012 host -> nslookup
-rw-r--r-- 1 root root 1.9K May  1 11:13 nslookup
fredden at gordo:/usr/share/bash-completion/completions$ diff -u nslookup-orig nslookup
--- nslookup-orig	2014-05-01 11:12:29.000000000 +1200
+++ nslookup	2014-05-01 11:13:00.000000000 +1200
@@ -40,6 +40,8 @@
             -retry= -timeout= -vc -novc -fail -nofail' -- "$cur" ) )
         [[ $COMPREPLY == *= ]] && compopt -o nospace
     fi
+
+    _known_hosts_real "$cur"
 } &&
 complete -F _nslookup nslookup
 
@@ -69,6 +71,8 @@
     if [[ $cur == -* ]]; then
         COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
     fi
+
+    _known_hosts_real "$cur"
 } &&
 complete -F _host host
 
fredden at gordo:/usr/share/bash-completion/completions$ dpkg-query -S nslookup | grep bash-completion 
bash-completion: /usr/share/bash-completion/completions/nslookup
fredden at gordo:/usr/share/bash-completion/completions$ apt-cache show bash-completion | head -n 2
Package: bash-completion
Version: 1:2.0-1
fredden at gordo:/usr/share/bash-completion/completions$ 


----------------------------------------------------------------------

Comment By: Dan Wallis (fredden-guest)
Date: 2014-05-01 11:34

Message:
Have just found that git HEAD already includes this line in the _host function. I've also checked and that version is in Jessie.

Please close this request as FIXED.

----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=314673&group_id=100114



More information about the Bash-completion-devel mailing list