Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
2449e412
Commit
2449e412
authored
May 09, 2015
by
Andrew Dwyer
Browse files
Add file completion as optional argument
parent
de769058
Changes
1
Show whitespace changes
Inline
Side-by-side
plugins/n98-magerun/n98-magerun.plugin.zsh
View file @
2449e412
...
@@ -7,11 +7,19 @@
...
@@ -7,11 +7,19 @@
# n98-magerun basic command completion
# n98-magerun basic command completion
_n98_magerun_get_command_list
()
{
_n98_magerun_get_command_list
()
{
n98-magerun.phar
--no-ansi
|
sed
"1,/Available commands/d"
|
awk
'/^ +[a-z\-:]+/ { print $1 }'
$_comp_command1
--no-ansi
|
sed
"1,/Available commands/d"
|
awk
'/^ +[a-z\-:]+/ { print $1 }'
}
}
_n98_magerun
()
{
_n98_magerun
()
{
compadd
`
_n98_magerun_get_command_list
`
_arguments
'1: :->command'
'*:optional arg:_files'
case
$state
in
command
)
compadd
$(
_n98_magerun_get_command_list
)
;;
*
)
esac
}
}
compdef _n98_magerun n98-magerun.phar
compdef _n98_magerun n98-magerun.phar
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment