Check whether avahi-daemon is started
This commit is contained in:
parent
ab36c8d29d
commit
1e532f0f2b
@ -1193,10 +1193,13 @@ _known_hosts_real()
|
||||
fi
|
||||
|
||||
# Add hosts reported by avahi, if it's available
|
||||
# and if the daemon is started.
|
||||
if type avahi-browse >&/dev/null; then
|
||||
COMPREPLY=( "${COMPREPLY[@]}" $(
|
||||
compgen -W "$( avahi-browse -kcpr _workstation._tcp | \
|
||||
grep ^= | cut -d\; -f7 | sort -u )" -- $cur ) )
|
||||
if [ -z "$(pidof avahi-daemon)" ]; then
|
||||
COMPREPLY=( "${COMPREPLY[@]}" $(
|
||||
compgen -W "$( avahi-browse -kcpr _workstation._tcp | \
|
||||
grep ^= | cut -d\; -f7 | sort -u )" -- $cur ) )
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now add results of normal hostname completion
|
||||
|
Loading…
x
Reference in New Issue
Block a user