cli-completion: work on the Stretch bash
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3929 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -31,7 +31,7 @@ _cli.php()
|
||||
opts="$opts
|
||||
$LISTCLASSESSLASH
|
||||
"
|
||||
read -r LISTCLASSESLINE <<< ${LISTCLASSES}
|
||||
LISTCLASSESLINE=$(tr '\n' ' ' <<< ${LISTCLASSES})
|
||||
if [ "$3" == "-list" ]; then
|
||||
# Do not take any option
|
||||
COMPREPLY=()
|
||||
@@ -78,7 +78,7 @@ $LISTCLASSESSLASH
|
||||
[ "${COMP_WORDS[3]+1}" != "" ]; then
|
||||
# Class + method + first parameter available
|
||||
local LISTMETHODS=$($1 $EXPERT -listmethodsonly "${CLASS}")
|
||||
read -r LISTMETHODSLINE <<< ${LISTMETHODS}
|
||||
LISTMETHODSLINE=$(tr '\n' ' ' <<< ${LISTMETHODS})
|
||||
METHOD=${COMP_WORDS[2]}
|
||||
if [[ " ${LISTCLASSESLINE} " =~ " ${CLASS} " ]] &&
|
||||
[[ " ${LISTMETHODSLINE} " =~ " ${METHOD} " ]]; then
|
||||
|
||||
Reference in New Issue
Block a user