Hi,

I am the maintainer of bash-completion in MacPorts. With bash-completion
1.1 I noticed some problems with completing hostnames on Mac OS X. There
is no pidof on the system, but it is being used to check if avahi-daemon
is running. This results in error messages written to the terminal on
pressing tab for scp, sftp, etc.

Here is a patch to eliminate use of pidof and remove the error messages.

Rainer



--- bash_completion-orig        2009-10-11 10:21:16.000000000 +0200
+++ bash_completion     2009-10-11 10:21:33.000000000 +0200
@@ -1306,11 +1306,9 @@
         #  the result. But on Gentoo (at least), -k isn't available
         #  (even if mentioned in the manpage), so...
         if type avahi-browse >&/dev/null; then
-            if [ -n "$(pidof avahi-daemon)" ]; then
-                COMPREPLY=( "${comprep...@]}" $(
-                compgen -W "$( avahi-browse -cpr _workstation._tcp | \
-                grep ^= | cut -d\; -f7 | sort -u )" -- "$cur" ) )
-            fi
+            COMPREPLY=( "${comprep...@]}" $(
+            compgen -W "$( avahi-browse -cpr _workstation._tcp 2>/dev/null | \
+            grep ^= | cut -d\; -f7 | sort -u )" -- "$cur" ) )
         fi
 
         # apply suffix and prefix
_______________________________________________
Bash-completion-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel

Reply via email to