Don't define _pids() and _pgids() twice on Solaris and AIX.
parent
75a3064ae1
commit
1ecea1901b
|
@ -1,6 +1,6 @@
|
|||
# bash_completion - some programmable completion functions for bash 2.05b
|
||||
#
|
||||
# $Id: bash_completion,v 1.794 2005/07/07 22:11:38 ianmacd Exp $
|
||||
# $Id: bash_completion,v 1.795 2005/07/07 23:09:39 ianmacd Exp $
|
||||
#
|
||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||
#
|
||||
|
@ -274,32 +274,28 @@ _expand()
|
|||
fi
|
||||
}
|
||||
|
||||
# This function completes on process IDs
|
||||
#
|
||||
# This function completes on process IDs.
|
||||
# AIX and Solaris ps prefers X/Open syntax.
|
||||
[ $UNAME = SunOS -o $UNAME = AIX ] &&
|
||||
_pids()
|
||||
{
|
||||
COMPREPLY=( $( compgen -W '$( command ps -efo pid | sed 1d )' -- $cur ))
|
||||
} ||
|
||||
_pids()
|
||||
{
|
||||
COMPREPLY=( $( compgen -W '$( command ps axo pid | sed 1d )' -- $cur ) )
|
||||
}
|
||||
|
||||
# AIX and Solaris ps prefers X/Open syntax, so we override the above here
|
||||
[ $UNAME = SunOS -o $UNAME = AIX ] &&
|
||||
_pids()
|
||||
{
|
||||
COMPREPLY=( $( compgen -W '$( command ps -efo pid | sed 1d )' -- $cur ))
|
||||
}
|
||||
|
||||
# This function completes on process group IDs
|
||||
#
|
||||
_pgids()
|
||||
{
|
||||
COMPREPLY=( $( compgen -W '$( command ps axo pgid | sed 1d )' -- $cur ))
|
||||
}
|
||||
|
||||
# As above, AIX and SunOS prefer X/Open, all else should be BSD
|
||||
# This function completes on process group IDs.
|
||||
# AIX and SunOS prefer X/Open, all else should be BSD.
|
||||
[ $UNAME = SunOS -o $UNAME = AIX ] &&
|
||||
_pgids()
|
||||
{
|
||||
COMPREPLY=( $( compgen -W '$( command ps -efo pgid | sed 1d )' -- $cur ))
|
||||
} ||
|
||||
_pgids()
|
||||
{
|
||||
COMPREPLY=( $( compgen -W '$( command ps axo pgid | sed 1d )' -- $cur ))
|
||||
}
|
||||
|
||||
# This function completes on user IDs
|
||||
|
|
Loading…
Reference in New Issue