Add subcommand argument example
This commit is contained in:
parent
56e4583314
commit
cbb5b0202b
15
run
15
run
|
@ -25,22 +25,27 @@ function run_lang -a command
|
||||||
run_hello
|
run_hello
|
||||||
end
|
end
|
||||||
|
|
||||||
function lang_fr
|
function lang_fr -a name
|
||||||
echo 'bonjour, le monde!'
|
if test -n "$name"
|
||||||
|
echo "bounjour, $name!"
|
||||||
|
else
|
||||||
|
echo 'bonjour, le monde!'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
execute_command 'lang' $command
|
execute_command 'lang' $command
|
||||||
end
|
end
|
||||||
|
|
||||||
### Command Execution ###
|
### Command Execution ###
|
||||||
# Do not edit, unless you want to alter how to script executes commands.
|
# Do not edit, unless you want to alter how the script executes commands.
|
||||||
#
|
#
|
||||||
# This script can execute 1 or more commands like makefile. It can also receive 1 argument per
|
# This script can execute 1 or more commands like make. It can also receive 1 argument per
|
||||||
# command in the following format: {name}{run_arg_delimeter}{argument}.
|
# command or subcommand in the following format: {name}{run_arg_delimeter}{argument}.
|
||||||
#
|
#
|
||||||
# Examples:
|
# Examples:
|
||||||
# ./run hello
|
# ./run hello
|
||||||
# ./run hey:mitchell
|
# ./run hey:mitchell
|
||||||
|
# ./run lang:fr:mitchell
|
||||||
# ./run hello hey:mitchell lang:fr
|
# ./run hello hey:mitchell lang:fr
|
||||||
#
|
#
|
||||||
function main
|
function main
|
||||||
|
|
Loading…
Reference in New Issue