From: Frederic Massart Date: Thu, 18 Jul 2013 04:03:23 +0000 (+0800) Subject: Behat and phpunit autocomplete short flags -f and -u X-Git-Tag: v0.4.2~20 X-Git-Url: https://git.cameron1729.xyz/?a=commitdiff_plain;h=c228f0e7b2021864205be43f95feb602b0af3534;p=mdk.git Behat and phpunit autocomplete short flags -f and -u --- diff --git a/extra/bash_completion b/extra/bash_completion index 0e0b93a..975a6e2 100644 --- a/extra/bash_completion +++ b/extra/bash_completion @@ -70,7 +70,7 @@ function _mdk() { case "${CMD}" in alias) if [[ "${COMP_CWORD}" == 2 ]]; then - OPTS="list show add remove" + OPTS="list show add remove set" elif [[ "${COMP_CWORD}" == 3 && "${PREV}" != "add" && "${PREV}" != "list" ]]; then OPTS="$($BIN alias list 2> /dev/null | cut -d ':' -f 1)" fi @@ -91,7 +91,7 @@ function _mdk() { fi ;; behat) - if [[ "${PREV}" == "--feature" ]]; then + if [[ "${PREV}" == "--feature" ]] || [[ "${PREV}" == "-f" ]]; then # Basic autocomplete for --feature, should append a / at the end of directory names. compopt +o nospace OPTS="$(compgen -A file $CUR)" @@ -151,7 +151,7 @@ function _mdk() { esac ;; phpunit) - if [[ "${PREV}" == "--unittest" ]]; then + if [[ "${PREV}" == "--unittest" ]] || [[ "${PREV}" == "-u" ]]; then # Basic autocomplete for --unittest, should append a / at the end of directory names. compopt +o nospace OPTS="$(compgen -A file $CUR)" @@ -187,7 +187,7 @@ function _mdk() { fi ;; remove) - OPTS=`$BIN info -ln` + OPTS="$OPTS $(_list_instances)" ;; run) if [[ "${COMP_CWORD}" == 2 ]]; then