Simplify $UNAME checks.
This commit is contained in:
parent
60b2106b78
commit
d4e177a6ab
@ -929,7 +929,7 @@ _expand()
|
|||||||
|
|
||||||
# This function completes on process IDs.
|
# This function completes on process IDs.
|
||||||
# AIX and Solaris ps prefers X/Open syntax.
|
# AIX and Solaris ps prefers X/Open syntax.
|
||||||
[[ $UNAME == SunOS || $UNAME == AIX ]] &&
|
[[ $UNAME == @(SunOS|AIX) ]] &&
|
||||||
_pids()
|
_pids()
|
||||||
{
|
{
|
||||||
COMPREPLY=( $( compgen -W '$( command ps -efo pid | sed 1d )' -- "$cur" ))
|
COMPREPLY=( $( compgen -W '$( command ps -efo pid | sed 1d )' -- "$cur" ))
|
||||||
@ -941,7 +941,7 @@ _pids()
|
|||||||
|
|
||||||
# This function completes on process group IDs.
|
# This function completes on process group IDs.
|
||||||
# AIX and SunOS prefer X/Open, all else should be BSD.
|
# AIX and SunOS prefer X/Open, all else should be BSD.
|
||||||
[[ $UNAME == SunOS || $UNAME == AIX ]] &&
|
[[ $UNAME == @(SunOS|AIX) ]] &&
|
||||||
_pgids()
|
_pgids()
|
||||||
{
|
{
|
||||||
COMPREPLY=( $( compgen -W '$( command ps -efo pgid | sed 1d )' -- "$cur" ))
|
COMPREPLY=( $( compgen -W '$( command ps -efo pgid | sed 1d )' -- "$cur" ))
|
||||||
@ -953,7 +953,7 @@ _pgids()
|
|||||||
|
|
||||||
# This function completes on process names.
|
# This function completes on process names.
|
||||||
# AIX and SunOS prefer X/Open, all else should be BSD.
|
# AIX and SunOS prefer X/Open, all else should be BSD.
|
||||||
[[ $UNAME == SunOS || $UNAME == AIX ]] &&
|
[[ $UNAME == @(SunOS|AIX) ]] &&
|
||||||
_pnames()
|
_pnames()
|
||||||
{
|
{
|
||||||
COMPREPLY=( $( compgen -X '<defunct>' -W '$( command ps -efo comm | \
|
COMPREPLY=( $( compgen -X '<defunct>' -W '$( command ps -efo comm | \
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
# man(1) completion
|
# man(1) completion
|
||||||
|
|
||||||
[[ $USERLAND == GNU || $UNAME == Darwin || $UNAME == FreeBSD || \
|
[[ $USERLAND == GNU || $UNAME == @(Darwin|FreeBSD|SunOS|Cygwin|OpenBSD) ]] &&
|
||||||
$UNAME == SunOS || $UNAME == Cygwin || $UNAME == OpenBSD ]] &&
|
|
||||||
_man()
|
_man()
|
||||||
{
|
{
|
||||||
local cur prev words cword
|
local cur prev words cword
|
||||||
|
Loading…
x
Reference in New Issue
Block a user