File tree Expand file tree Collapse file tree 4 files changed +7
-6
lines changed
spec/fixtures/workspaces/empty-args Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 11# :command.required_args_filter
22% required_args.each do |arg|
3- if [[ $1 && $1 != -* ]]; then
3+ if [[ -n ${1+x} && $1 != -* ]]; then
44<%= arg.render(:validations).indent 2 %>
55 args[<%= arg.name %> ]=$1
66 shift
Original file line number Diff line number Diff line change @@ -9,4 +9,6 @@ commands:
99 - long : --flag
1010 arg : value
1111 args :
12- - name : arg
12+ - name : required_arg
13+ required : true
14+ - name : optional_arg
Original file line number Diff line number Diff line change 1- echo " # this file is located in 'src/test_command.sh'"
2- echo " # code for 'cli test' goes here"
3- echo " # you can edit it freely and regenerate (it will not be overwritten)"
41inspect_args
Original file line number Diff line number Diff line change @@ -7,5 +7,7 @@ bundle exec bashly generate
77
88set -x
99
10+ ./cli test a b --flag c
1011./cli test ' '
11- ./cli test --flag ' '
12+ ./cli test ' ' --flag ' '
13+ ./cli test ' ' ' ' --flag ' '
You can’t perform that action at this time.
0 commit comments