[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-119-gf5d4906
Ville Skyttä
ville.skytta at iki.fi
Mon Apr 25 10:48:55 UTC 2011
The following commit has been merged in the master branch:
commit d4e177a6ab777e019da29b58b5056ad17b7b4f2b
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Mon Apr 25 12:54:55 2011 +0300
Simplify $UNAME checks.
diff --git a/bash_completion b/bash_completion
index 5d657b3..2dcaece 100644
--- a/bash_completion
+++ b/bash_completion
@@ -929,7 +929,7 @@ _expand()
# This function completes on process IDs.
# AIX and Solaris ps prefers X/Open syntax.
-[[ $UNAME == SunOS || $UNAME == AIX ]] &&
+[[ $UNAME == @(SunOS|AIX) ]] &&
_pids()
{
COMPREPLY=( $( compgen -W '$( command ps -efo pid | sed 1d )' -- "$cur" ))
@@ -941,7 +941,7 @@ _pids()
# This function completes on process group IDs.
# AIX and SunOS prefer X/Open, all else should be BSD.
-[[ $UNAME == SunOS || $UNAME == AIX ]] &&
+[[ $UNAME == @(SunOS|AIX) ]] &&
_pgids()
{
COMPREPLY=( $( compgen -W '$( command ps -efo pgid | sed 1d )' -- "$cur" ))
@@ -953,7 +953,7 @@ _pgids()
# This function completes on process names.
# AIX and SunOS prefer X/Open, all else should be BSD.
-[[ $UNAME == SunOS || $UNAME == AIX ]] &&
+[[ $UNAME == @(SunOS|AIX) ]] &&
_pnames()
{
COMPREPLY=( $( compgen -X '<defunct>' -W '$( command ps -efo comm | \
diff --git a/completions/man b/completions/man
index 0460105..2515f2d 100644
--- a/completions/man
+++ b/completions/man
@@ -1,7 +1,6 @@
# man(1) completion
-[[ $USERLAND == GNU || $UNAME == Darwin || $UNAME == FreeBSD || \
- $UNAME == SunOS || $UNAME == Cygwin || $UNAME == OpenBSD ]] &&
+[[ $USERLAND == GNU || $UNAME == @(Darwin|FreeBSD|SunOS|Cygwin|OpenBSD) ]] &&
_man()
{
local cur prev words cword
--
bash-completion
More information about the Bash-completion-commits
mailing list