Added avahi-discovered hosts to _known_hosts_real() (Debian: #518561)

This commit is contained in:
David Paleino 2009-06-18 13:12:52 +02:00
parent f4c8afb826
commit ab36c8d29d
2 changed files with 9 additions and 1 deletions

View File

@ -31,6 +31,7 @@ bash-completion (1.x)
* Split dselect completion to contrib/dselect * Split dselect completion to contrib/dselect
* Split cardctl completion to contrib/cardctl * Split cardctl completion to contrib/cardctl
* Split pineaddr completion to contrib/pine * Split pineaddr completion to contrib/pine
* Added avahi-discovered hosts to _known_hosts_real() (Debian: #518561)
[ Ville Skyttä ] [ Ville Skyttä ]
* Split yum and yum-arch completion into contrib/yum. * Split yum and yum-arch completion into contrib/yum.
@ -131,7 +132,7 @@ bash-completion (1.x)
* Patched _known_hosts() to support multiple {Global,User}KnownHosts in SSH * Patched _known_hosts() to support multiple {Global,User}KnownHosts in SSH
config files, thanks to Thomas Nilsson (Alioth: #311595) (Debian: #524190) config files, thanks to Thomas Nilsson (Alioth: #311595) (Debian: #524190)
-- David Paleino <d.paleino@gmail.com> Wed, 20 May 2009 22:08:42 +0200 -- David Paleino <d.paleino@gmail.com> Thu, 18 Jun 2009 13:12:36 +0200
bash-completion (1.0) bash-completion (1.0)

View File

@ -1192,6 +1192,13 @@ _known_hosts_real()
COMPREPLY=( "${COMPREPLY[@]}" $hosts ) COMPREPLY=( "${COMPREPLY[@]}" $hosts )
fi fi
# Add hosts reported by avahi, if it's available
if type avahi-browse >&/dev/null; then
COMPREPLY=( "${COMPREPLY[@]}" $(
compgen -W "$( avahi-browse -kcpr _workstation._tcp | \
grep ^= | cut -d\; -f7 | sort -u )" -- $cur ) )
fi
# Now add results of normal hostname completion # Now add results of normal hostname completion
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -A hostname -- $cur ) ) COMPREPLY=( "${COMPREPLY[@]}" $( compgen -A hostname -- $cur ) )