mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
move the aliases a little
This commit is contained in:
parent
1bef83e62b
commit
a636ada198
3 changed files with 34 additions and 4 deletions
|
|
@ -1,9 +1,9 @@
|
|||
#compdef composer.phar
|
||||
#compdef composer
|
||||
#autoload
|
||||
|
||||
local -a _1st_arguments
|
||||
|
||||
_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 --no-ansi | sed "1,/Available commands/d" | awk '{ printf $1":"; for (i = 2; i <= NF; i++) printf "%s\xc2\xa0",$i; printf "\n" }'`)
|
||||
|
||||
_arguments \
|
||||
'(--help)--help[Display help message.]' \
|
||||
|
|
@ -16,6 +16,6 @@ _arguments \
|
|||
'*:: :->subcmds' && return 0
|
||||
|
||||
if (( CURRENT == 1 )); then
|
||||
_describe -t commands "composer.phar subcommand" _1st_arguments
|
||||
_describe -t commands "composer subcommand" _1st_arguments
|
||||
return
|
||||
fi
|
||||
|
|
|
|||
21
plugins/composer/_composer.phar
Normal file
21
plugins/composer/_composer.phar
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#compdef composer.phar
|
||||
#autoload
|
||||
|
||||
local -a _1st_arguments
|
||||
|
||||
_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" }'`)
|
||||
|
||||
_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
|
||||
|
||||
if (( CURRENT == 1 )); then
|
||||
_describe -t commands "composer.phar subcommand" _1st_arguments
|
||||
return
|
||||
fi
|
||||
|
|
@ -1,2 +1,11 @@
|
|||
#alias
|
||||
alias composer="composer.phar"
|
||||
if which composer.phar &> /dev/null; then
|
||||
if which composer &> /dev/null; then
|
||||
else
|
||||
alias composer="composer.phar"
|
||||
fi
|
||||
else
|
||||
if which composer &> /dev/null; then
|
||||
alias composer.phar="composer"
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue