[Bash-completion-commits] [SCM] bash-completion branch, master, updated. d07e282122f3ec3edf207bc75d5aa783ff055c12

Ville Skyttä ville.skytta at iki.fi
Sun Feb 15 17:12:03 UTC 2009


The following commit has been merged in the master branch:
commit d07e282122f3ec3edf207bc75d5aa783ff055c12
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sun Feb 15 19:12:05 2009 +0200

    Enable pkill completion if the command is available, not just on Linux and FreeBSD.

diff --git a/bash_completion b/bash_completion
index 8a68c89..614a7ed 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1042,9 +1042,9 @@ _kill()
 }
 complete -F _kill kill
 
-# Linux and FreeBSD killall(1) completion.
+# killall(1) (Linux and FreeBSD) and pkill(1) completion.
 #
-[ $UNAME = Linux -o $UNAME = FreeBSD ] &&
+[ $UNAME = Linux -o $UNAME = FreeBSD ] || have pkill &&
 _killall()
 {
 	local cur
@@ -1060,7 +1060,8 @@ _killall()
 
 	return 0
 }
-[ $UNAME = Linux -o $UNAME = FreeBSD ] && complete -F _killall killall pkill
+[ $UNAME = Linux -o $UNAME = FreeBSD ] && complete -F _killall killall
+have pkill && complete -F _killall pkill
 
 # pgrep(1) completion.
 #
diff --git a/debian/changelog b/debian/changelog
index 555e832..4062cad 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -126,7 +126,8 @@ bash-completion (200902xx) UNRELEASED; urgency=low
     for others than Linux and FreeBSD.
   * Fix process name completion with relative paths (RHBZ: #484578).
   * Use improved process name completion in pgrep in addition to killall.
-  * Enable pgrep completion if pgrep is available, not just on Linux/FreeBSD.
+  * Enable pgrep and pkill completion if the commands are available, not just
+    on Linux and FreeBSD.
 
   [ Freddy Vulto ]
   * Restored `_display()' completion for `display' by removing

-- 
bash-completion



More information about the Bash-completion-commits mailing list