Commit 2449e412 authored by Andrew Dwyer's avatar Andrew Dwyer
Browse files

Add file completion as optional argument

parent de769058
......@@ -7,11 +7,19 @@
# n98-magerun basic command completion
_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 () {
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment