diff options
author | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2019-08-07 09:17:13 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2019-08-07 09:17:13 -0300 |
commit | 5732da2af736c40cf693354485446ab4867ecb4d (patch) | |
tree | 76d76cdfa16ca62d20fb109da13895ec64fff110 /completions/ant | |
parent | 9cd22d1df8f0f5b554858471c86faa9f37b8fed4 (diff) | |
download | bash-completion-5732da2af736c40cf693354485446ab4867ecb4d.tar.gz |
New upstream version 2.9upstream/2.9
Diffstat (limited to 'completions/ant')
-rw-r--r-- | completions/ant | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/completions/ant b/completions/ant index 639cde97..ba141965 100644 --- a/completions/ant +++ b/completions/ant @@ -11,7 +11,7 @@ _ant_parse_targets() if [[ $line =~ \<(target|extension-point)[[:space:]].*name=[\"\']([^\"\']+) ]]; then targets+=" ${BASH_REMATCH[2]}" fi - done < $1 + done <$1 # parse imports while read -rd '>' line; do @@ -22,7 +22,7 @@ _ant_parse_targets() _ant_parse_targets $imported_buildfile fi fi - done < $1 + done <$1 } _ant() @@ -39,7 +39,7 @@ _ant() return ;; -logfile|-l) - _filedir + [[ $1 != *phing || $prev != -l ]] && _filedir return ;; -propertyfile) @@ -47,7 +47,7 @@ _ant() return ;; -nice) - COMPREPLY=( $( compgen -W '{1..10}' -- "$cur" ) ) + COMPREPLY=( $(compgen -W '{1..10}' -- "$cur") ) return ;; -lib) @@ -62,7 +62,10 @@ _ant() if [[ $cur == -D* ]]; then return elif [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '$( _parse_help "$1" -h )' -- "$cur" ) ) + # The </dev/null prevents "phing -" weirdness/getting just a literal + # tab displayed on complete on CentOS 6 with phing 2.6.1. + COMPREPLY=( + $(compgen -W '$(_parse_help "$1" -h </dev/null)' -- "$cur") ) else # available targets completion # find which buildfile to use @@ -89,7 +92,7 @@ _ant() # fill targets _ant_parse_targets $buildfile - COMPREPLY=( $( compgen -W '$targets' -- "$cur" ) ) + COMPREPLY=( $(compgen -W '$targets' -- "$cur") ) fi } && complete -F _ant ant phing |