mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
add arguments
This commit is contained in:
parent
63346edb1b
commit
1bef83e62b
1 changed files with 9 additions and 9 deletions
|
|
@ -1,18 +1,18 @@
|
||||||
#simple composer subcommand completion
|
|
||||||
#compdef composer.phar
|
#compdef composer.phar
|
||||||
#autoload
|
#autoload
|
||||||
|
|
||||||
local -a _1st_arguments
|
local -a _1st_arguments
|
||||||
|
|
||||||
if [ -f composer.phar ]; then
|
|
||||||
_1st_arguments=(`./composer.phar --no-ansi | sed "1,/Available commands/d" | awk '{ printf $1":"; for (i = 2; i <= NF; i++) printf "%s\xc2\xa0",$i; printf "\n" }'`)
|
|
||||||
else
|
|
||||||
if which composer.phar &> /dev/null; then
|
|
||||||
_1st_arguments=(`composer.phar --no-ansi | sed "1,/Available commands/d" | awk '{ printf $1":"; for (i = 2; i <= NF; i++) printf "%s\xc2\xa0",$i; printf "\n" }'`)
|
_1st_arguments=(`composer.phar --no-ansi | sed "1,/Available commands/d" | awk '{ printf $1":"; for (i = 2; i <= NF; i++) printf "%s\xc2\xa0",$i; printf "\n" }'`)
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
_arguments \
|
_arguments \
|
||||||
|
'(--help)--help[Display help message.]' \
|
||||||
|
'(--quiet)--quiet[Do not output any message.]' \
|
||||||
|
'(--verbose)--verbose[Increase verbosity of messages.]' \
|
||||||
|
'(--version)--version[Display this application version.]' \
|
||||||
|
'(--ansi)--ansi[Force ANSI output.]' \
|
||||||
|
'(--no-ansi)--no-ansi[Disable ANSI output.]' \
|
||||||
|
'(--no-interaction)--no-interaction[Do not ask any interactive question.]' \
|
||||||
'*:: :->subcmds' && return 0
|
'*:: :->subcmds' && return 0
|
||||||
|
|
||||||
if (( CURRENT == 1 )); then
|
if (( CURRENT == 1 )); then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue