From c85276cde9fc59c0c43debb737e85bbf54d51b02 Mon Sep 17 00:00:00 2001 From: Danny Ben Shitrit Date: Fri, 27 Dec 2024 18:09:22 +0000 Subject: [PATCH] - Update default script header --- examples/catch-all-advanced/README.md | 42 +++++++++++-------- .../src/download_command.sh | 7 ++-- .../catch-all-advanced/src/upload_command.sh | 7 ++-- examples/catch-all/README.md | 18 +++++--- examples/catch-all/src/root_command.sh | 6 ++- examples/command-aliases/README.md | 14 ++++--- .../command-aliases/src/download_command.sh | 7 ++-- .../command-aliases/src/upload_command.sh | 7 ++-- examples/command-default-force/README.md | 21 ++++++---- .../command-default-force/src/all_command.sh | 7 ++-- .../command-default-force/src/only_command.sh | 7 ++-- examples/command-default/README.md | 21 ++++++---- .../command-default/src/download_command.sh | 7 ++-- .../command-default/src/upload_command.sh | 7 ++-- .../src/download_command.sh | 7 ++-- .../src/upload_command.sh | 7 ++-- .../command-examples/src/download_command.sh | 7 ++-- .../command-examples/src/upload_command.sh | 7 ++-- examples/command-filenames/README.md | 7 ++-- .../src/dir_commands/list.sh | 7 ++-- .../src/dir_commands/remove.sh | 7 ++-- .../src/file_commands/edit.sh | 7 ++-- .../src/file_commands/show.sh | 7 ++-- .../src/container_start_command.sh | 7 ++-- examples/command-groups/README.md | 7 ++-- .../command-groups/src/download_command.sh | 7 ++-- examples/command-groups/src/login_command.sh | 7 ++-- examples/command-groups/src/logout_command.sh | 7 ++-- examples/command-groups/src/upload_command.sh | 7 ++-- examples/command-paths/README.md | 7 ++-- .../src/commands/container/run.sh | 7 ++-- .../src/commands/container/stop.sh | 7 ++-- .../command-paths/src/commands/image/ls.sh | 7 ++-- examples/command-paths/src/commands/ps.sh | 7 ++-- examples/command-private/README.md | 14 ++++--- .../src/connect_ftp_command.sh | 7 ++-- .../src/connect_ssh_command.sh | 7 ++-- .../src/config_edit_command.sh | 7 ++-- .../src/config_show_command.sh | 7 ++-- .../src/container_down_command.sh | 7 ++-- .../src/container_exec_command.sh | 7 ++-- examples/commands-expose/src/init_command.sh | 7 ++-- .../src/server_start_command.sh | 7 ++-- .../src/server_stop_command.sh | 7 ++-- examples/commands-nested/README.md | 7 ++-- .../commands-nested/src/dir_list_command.sh | 7 ++-- .../commands-nested/src/dir_remove_command.sh | 7 ++-- .../commands-nested/src/file_edit_command.sh | 7 ++-- .../commands-nested/src/file_show_command.sh | 7 ++-- examples/commands/README.md | 14 ++++--- examples/commands/src/download_command.sh | 7 ++-- examples/commands/src/upload_command.sh | 7 ++-- examples/custom-strings/src/root_command.sh | 6 ++- examples/default-values/README.md | 24 +++++++---- examples/default-values/src/root_command.sh | 6 ++- examples/dependencies-alt/README.md | 7 ++-- .../dependencies-alt/src/download_command.sh | 7 ++-- examples/dependencies/src/download_command.sh | 7 ++-- examples/dependencies/src/upload_command.sh | 7 ++-- examples/docker-like/README.md | 28 +++++++------ .../docker-like/src/container_run_command.sh | 7 ++-- .../docker-like/src/container_stop_command.sh | 7 ++-- examples/docker-like/src/image_ls_command.sh | 7 ++-- examples/docker-like/src/ps_command.sh | 7 ++-- examples/extensible-delegate/README.md | 7 ++-- .../extensible-delegate/src/pull_command.sh | 7 ++-- .../extensible-delegate/src/push_command.sh | 7 ++-- examples/extensible/src/download_command.sh | 7 ++-- examples/extensible/src/upload_command.sh | 7 ++-- examples/footer/README.md | 6 ++- examples/footer/src/root_command.sh | 6 ++- examples/git-like/README.md | 14 ++++--- examples/git-like/src/commit_command.sh | 7 ++-- examples/git-like/src/status_command.sh | 7 ++-- examples/help-command/src/download_command.sh | 7 ++-- examples/help-command/src/upload_command.sh | 7 ++-- examples/minimal/README.md | 6 ++- examples/minimal/src/root_command.sh | 6 ++- examples/minus-v/README.md | 18 +++++--- examples/minus-v/src/root_command.sh | 6 ++- examples/multiline/README.md | 7 ++-- examples/multiline/src/multiline_command.sh | 7 ++-- examples/multiline/src/regular_command.sh | 7 ++-- .../private-reveal/src/admin_list_command.sh | 7 ++-- .../src/admin_reboot_command.sh | 7 ++-- examples/reusable-flags/README.md | 14 ++++--- .../reusable-flags/src/download_command.sh | 7 ++-- examples/reusable-flags/src/upload_command.sh | 7 ++-- examples/settings/src/download_command.sh | 7 ++-- examples/settings/src/upload_command.sh | 7 ++-- examples/split-config/src/download_command.sh | 7 ++-- examples/validations/README.md | 14 ++++--- examples/validations/src/build_command.sh | 7 ++-- examples/validations/src/calc_command.sh | 7 ++-- examples/whitelist/README.md | 12 ++++-- examples/whitelist/src/root_command.sh | 6 ++- lib/bashly/commands/generate.rb | 2 +- .../views/command/default_root_script.gtx | 6 --- lib/bashly/views/command/default_script.gtx | 7 ++-- spec/approvals/examples/catch-all | 18 +++++--- spec/approvals/examples/catch-all-advanced | 42 +++++++++++-------- spec/approvals/examples/command-aliases | 14 ++++--- spec/approvals/examples/command-default | 21 ++++++---- spec/approvals/examples/command-default-force | 21 ++++++---- spec/approvals/examples/command-filenames | 7 ++-- spec/approvals/examples/command-groups | 7 ++-- spec/approvals/examples/command-paths | 7 ++-- spec/approvals/examples/command-private | 14 ++++--- spec/approvals/examples/commands | 14 ++++--- spec/approvals/examples/commands-nested | 7 ++-- spec/approvals/examples/default-values | 24 +++++++---- spec/approvals/examples/dependencies-alt | 7 ++-- spec/approvals/examples/docker-like | 28 +++++++------ spec/approvals/examples/extensible-delegate | 7 ++-- spec/approvals/examples/footer | 6 ++- spec/approvals/examples/git-like | 14 ++++--- spec/approvals/examples/minimal | 6 ++- spec/approvals/examples/minus-v | 18 +++++--- spec/approvals/examples/multiline | 7 ++-- spec/approvals/examples/reusable-flags | 14 ++++--- spec/approvals/examples/validations | 14 ++++--- spec/approvals/examples/whitelist | 12 ++++-- spec/approvals/fixtures/catch-all-no-args | 6 ++- .../fixtures/default-command-flag-only | 21 ++++++---- spec/approvals/fixtures/default-validations | 6 ++- .../fixtures/environment-variables-initialize | 7 ++-- spec/approvals/fixtures/flag-args-with-dash | 24 +++++++---- spec/approvals/fixtures/flag-notation | 24 +++++++---- spec/approvals/fixtures/flag-private | 12 ++++-- spec/approvals/fixtures/global-flags | 14 ++++--- spec/approvals/fixtures/partials-extension | 7 ++-- .../fixtures/repeatable-arg-validations | 18 +++++--- .../fixtures/repeatable-flag-validations | 18 +++++--- spec/approvals/fixtures/repeatable-whitelist | 18 +++++--- spec/approvals/fixtures/required-args-order | 24 +++++++---- spec/approvals/fixtures/short-command-code | 7 ++-- spec/approvals/fixtures/short-flag | 12 ++++-- spec/approvals/fixtures/validation-functions | 24 +++++++---- .../approvals/fixtures/version-in-subcommands | 14 ++++--- spec/approvals/fixtures/whitelist-optional | 12 ++++-- 140 files changed, 861 insertions(+), 584 deletions(-) delete mode 100644 lib/bashly/views/command/default_root_script.gtx diff --git a/examples/catch-all-advanced/README.md b/examples/catch-all-advanced/README.md index 58c5749b4..a62369d66 100644 --- a/examples/catch-all-advanced/README.md +++ b/examples/catch-all-advanced/README.md @@ -121,9 +121,10 @@ Examples: ### `$ ./cli download source` ````shell -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = source @@ -133,9 +134,10 @@ args: ### `$ ./cli download source target` ````shell -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = source - ${args[target]} = target @@ -146,9 +148,10 @@ args: ### `$ ./cli download source target --force` ````shell -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--force]} = 1 - ${args[source]} = source @@ -160,9 +163,10 @@ args: ### `$ ./cli download source target --force -abc --option=value` ````shell -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--force]} = 1 - ${args[source]} = source @@ -182,9 +186,10 @@ other_args: ### `$ ./cli download source target --force -- -abc --option=value` ````shell -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--force]} = 1 - ${args[source]} = source @@ -233,9 +238,10 @@ usage: cli upload [--] FILES... ### `$ ./cli upload file1 "file 2" file3` ````shell -# this file is located in 'src/upload_command.sh' -# code for 'cli upload' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/upload_command.sh'. +# It contains the implementation for the 'cli upload' command. +# The code you write here will be wrapped by a function named 'cli_upload_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none other_args: diff --git a/examples/catch-all-advanced/src/download_command.sh b/examples/catch-all-advanced/src/download_command.sh index 950ed3709..308ab9cf0 100644 --- a/examples/catch-all-advanced/src/download_command.sh +++ b/examples/catch-all-advanced/src/download_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/download_command.sh'" -echo "# code for 'cli download' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/download_command.sh'." +echo "# It contains the implementation for the 'cli download' command." +echo "# The code you write here will be wrapped by a function named 'cli_download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/catch-all-advanced/src/upload_command.sh b/examples/catch-all-advanced/src/upload_command.sh index 755e02ff1..2999ec150 100644 --- a/examples/catch-all-advanced/src/upload_command.sh +++ b/examples/catch-all-advanced/src/upload_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/upload_command.sh'" -echo "# code for 'cli upload' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/upload_command.sh'." +echo "# It contains the implementation for the 'cli upload' command." +echo "# The code you write here will be wrapped by a function named 'cli_upload_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/catch-all/README.md b/examples/catch-all/README.md index 2b5da2db3..49189fbcd 100644 --- a/examples/catch-all/README.md +++ b/examples/catch-all/README.md @@ -77,8 +77,10 @@ Arguments: ### `$ ./download something` ````shell -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[message]} = something @@ -88,8 +90,10 @@ args: ### `$ ./download something with --additional args` ````shell -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[message]} = something @@ -105,8 +109,10 @@ other_args: ### `$ ./download something --debug -- also pass --debug to catch_all` ````shell -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--debug]} = 1 - ${args[message]} = something diff --git a/examples/catch-all/src/root_command.sh b/examples/catch-all/src/root_command.sh index 91e643078..28c47a208 100644 --- a/examples/catch-all/src/root_command.sh +++ b/examples/catch-all/src/root_command.sh @@ -1,3 +1,5 @@ -echo "# this file is located in 'src/root_command.sh'" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/root_command.sh'." +echo "# It contains the implementation for the 'download' command." +echo "# The code you write here will be wrapped by a function named 'download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-aliases/README.md b/examples/command-aliases/README.md index a2eaa89a1..c8bde663d 100644 --- a/examples/command-aliases/README.md +++ b/examples/command-aliases/README.md @@ -141,9 +141,10 @@ Examples: ### `$ ./cli d somefile` ````shell -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = somefile @@ -212,9 +213,10 @@ Examples: ### `$ ./cli push somefile` ````shell -# this file is located in 'src/upload_command.sh' -# code for 'cli upload' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/upload_command.sh'. +# It contains the implementation for the 'cli upload' command. +# The code you write here will be wrapped by a function named 'cli_upload_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = somefile diff --git a/examples/command-aliases/src/download_command.sh b/examples/command-aliases/src/download_command.sh index 950ed3709..308ab9cf0 100644 --- a/examples/command-aliases/src/download_command.sh +++ b/examples/command-aliases/src/download_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/download_command.sh'" -echo "# code for 'cli download' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/download_command.sh'." +echo "# It contains the implementation for the 'cli download' command." +echo "# The code you write here will be wrapped by a function named 'cli_download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-aliases/src/upload_command.sh b/examples/command-aliases/src/upload_command.sh index 755e02ff1..2999ec150 100644 --- a/examples/command-aliases/src/upload_command.sh +++ b/examples/command-aliases/src/upload_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/upload_command.sh'" -echo "# code for 'cli upload' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/upload_command.sh'." +echo "# It contains the implementation for the 'cli upload' command." +echo "# The code you write here will be wrapped by a function named 'cli_upload_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-default-force/README.md b/examples/command-default-force/README.md index 371ef9fea..71d589f47 100644 --- a/examples/command-default-force/README.md +++ b/examples/command-default-force/README.md @@ -68,9 +68,10 @@ Options: ### `$ ./tester` ````shell -# this file is located in 'src/all_command.sh' -# code for 'tester all' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/all_command.sh'. +# It contains the implementation for the 'tester all' command. +# The code you write here will be wrapped by a function named 'tester_all_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none @@ -79,9 +80,10 @@ args: none ### `$ ./tester all` ````shell -# this file is located in 'src/all_command.sh' -# code for 'tester all' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/all_command.sh'. +# It contains the implementation for the 'tester all' command. +# The code you write here will be wrapped by a function named 'tester_all_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none @@ -107,9 +109,10 @@ Options: ### `$ ./tester only one` ````shell -# this file is located in 'src/only_command.sh' -# code for 'tester only' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/only_command.sh'. +# It contains the implementation for the 'tester only' command. +# The code you write here will be wrapped by a function named 'tester_only_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[search]} = one diff --git a/examples/command-default-force/src/all_command.sh b/examples/command-default-force/src/all_command.sh index 07987dbd9..b19f07fbd 100644 --- a/examples/command-default-force/src/all_command.sh +++ b/examples/command-default-force/src/all_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/all_command.sh'" -echo "# code for 'tester all' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/all_command.sh'." +echo "# It contains the implementation for the 'tester all' command." +echo "# The code you write here will be wrapped by a function named 'tester_all_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-default-force/src/only_command.sh b/examples/command-default-force/src/only_command.sh index a96130488..a8f9d995f 100644 --- a/examples/command-default-force/src/only_command.sh +++ b/examples/command-default-force/src/only_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/only_command.sh'" -echo "# code for 'tester only' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/only_command.sh'." +echo "# It contains the implementation for the 'tester only' command." +echo "# The code you write here will be wrapped by a function named 'tester_only_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-default/README.md b/examples/command-default/README.md index 1e4b37615..1ea93a0ad 100644 --- a/examples/command-default/README.md +++ b/examples/command-default/README.md @@ -95,9 +95,10 @@ Options: ### `$ ./ftp download something` ````shell -# this file is located in 'src/download_command.sh' -# code for 'ftp download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'ftp download' command. +# The code you write here will be wrapped by a function named 'ftp_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = something @@ -139,9 +140,10 @@ Arguments: ### `$ ./ftp upload something` ````shell -# this file is located in 'src/upload_command.sh' -# code for 'ftp upload' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/upload_command.sh'. +# It contains the implementation for the 'ftp upload' command. +# The code you write here will be wrapped by a function named 'ftp_upload_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = something @@ -151,9 +153,10 @@ args: ### `$ ./ftp something` ````shell -# this file is located in 'src/upload_command.sh' -# code for 'ftp upload' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/upload_command.sh'. +# It contains the implementation for the 'ftp upload' command. +# The code you write here will be wrapped by a function named 'ftp_upload_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = something diff --git a/examples/command-default/src/download_command.sh b/examples/command-default/src/download_command.sh index d6f4bfd91..1cf093d32 100644 --- a/examples/command-default/src/download_command.sh +++ b/examples/command-default/src/download_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/download_command.sh'" -echo "# code for 'ftp download' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/download_command.sh'." +echo "# It contains the implementation for the 'ftp download' command." +echo "# The code you write here will be wrapped by a function named 'ftp_download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-default/src/upload_command.sh b/examples/command-default/src/upload_command.sh index f6058c2f0..4f1d04ed6 100644 --- a/examples/command-default/src/upload_command.sh +++ b/examples/command-default/src/upload_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/upload_command.sh'" -echo "# code for 'ftp upload' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/upload_command.sh'." +echo "# It contains the implementation for the 'ftp upload' command." +echo "# The code you write here will be wrapped by a function named 'ftp_upload_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-examples-on-error/src/download_command.sh b/examples/command-examples-on-error/src/download_command.sh index 950ed3709..308ab9cf0 100644 --- a/examples/command-examples-on-error/src/download_command.sh +++ b/examples/command-examples-on-error/src/download_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/download_command.sh'" -echo "# code for 'cli download' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/download_command.sh'." +echo "# It contains the implementation for the 'cli download' command." +echo "# The code you write here will be wrapped by a function named 'cli_download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-examples-on-error/src/upload_command.sh b/examples/command-examples-on-error/src/upload_command.sh index 755e02ff1..2999ec150 100644 --- a/examples/command-examples-on-error/src/upload_command.sh +++ b/examples/command-examples-on-error/src/upload_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/upload_command.sh'" -echo "# code for 'cli upload' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/upload_command.sh'." +echo "# It contains the implementation for the 'cli upload' command." +echo "# The code you write here will be wrapped by a function named 'cli_upload_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-examples/src/download_command.sh b/examples/command-examples/src/download_command.sh index 950ed3709..308ab9cf0 100644 --- a/examples/command-examples/src/download_command.sh +++ b/examples/command-examples/src/download_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/download_command.sh'" -echo "# code for 'cli download' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/download_command.sh'." +echo "# It contains the implementation for the 'cli download' command." +echo "# The code you write here will be wrapped by a function named 'cli_download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-examples/src/upload_command.sh b/examples/command-examples/src/upload_command.sh index 755e02ff1..2999ec150 100644 --- a/examples/command-examples/src/upload_command.sh +++ b/examples/command-examples/src/upload_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/upload_command.sh'" -echo "# code for 'cli upload' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/upload_command.sh'." +echo "# It contains the implementation for the 'cli upload' command." +echo "# The code you write here will be wrapped by a function named 'cli_upload_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-filenames/README.md b/examples/command-filenames/README.md index 1acc939bd..4640a3944 100644 --- a/examples/command-filenames/README.md +++ b/examples/command-filenames/README.md @@ -107,9 +107,10 @@ Options: ### `$ ./cli dir list` ````shell -# this file is located in 'src/dir_commands/list.sh' -# code for 'cli dir list' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/dir_commands/list.sh'. +# It contains the implementation for the 'cli dir list' command. +# The code you write here will be wrapped by a function named 'cli_dir_list_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none diff --git a/examples/command-filenames/src/dir_commands/list.sh b/examples/command-filenames/src/dir_commands/list.sh index 78ff075a8..33557c713 100644 --- a/examples/command-filenames/src/dir_commands/list.sh +++ b/examples/command-filenames/src/dir_commands/list.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/dir_commands/list.sh'" -echo "# code for 'cli dir list' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/dir_commands/list.sh'." +echo "# It contains the implementation for the 'cli dir list' command." +echo "# The code you write here will be wrapped by a function named 'cli_dir_list_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-filenames/src/dir_commands/remove.sh b/examples/command-filenames/src/dir_commands/remove.sh index 3bf576e95..17e493cea 100644 --- a/examples/command-filenames/src/dir_commands/remove.sh +++ b/examples/command-filenames/src/dir_commands/remove.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/dir_commands/remove.sh'" -echo "# code for 'cli dir remove' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/dir_commands/remove.sh'." +echo "# It contains the implementation for the 'cli dir remove' command." +echo "# The code you write here will be wrapped by a function named 'cli_dir_remove_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-filenames/src/file_commands/edit.sh b/examples/command-filenames/src/file_commands/edit.sh index 696dfe656..c8f2fb502 100644 --- a/examples/command-filenames/src/file_commands/edit.sh +++ b/examples/command-filenames/src/file_commands/edit.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/file_commands/edit.sh'" -echo "# code for 'cli file edit' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/file_commands/edit.sh'." +echo "# It contains the implementation for the 'cli file edit' command." +echo "# The code you write here will be wrapped by a function named 'cli_file_edit_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-filenames/src/file_commands/show.sh b/examples/command-filenames/src/file_commands/show.sh index d9ce64549..a9068ac85 100644 --- a/examples/command-filenames/src/file_commands/show.sh +++ b/examples/command-filenames/src/file_commands/show.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/file_commands/show.sh'" -echo "# code for 'cli file show' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/file_commands/show.sh'." +echo "# It contains the implementation for the 'cli file show' command." +echo "# The code you write here will be wrapped by a function named 'cli_file_show_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-function/src/container_start_command.sh b/examples/command-function/src/container_start_command.sh index 2eca25764..b05d1346b 100644 --- a/examples/command-function/src/container_start_command.sh +++ b/examples/command-function/src/container_start_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/container_start_command.sh'" -echo "# code for 'cli container-start' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/container_start_command.sh'." +echo "# It contains the implementation for the 'cli container-start' command." +echo "# The code you write here will be wrapped by a function named 'deprecated_container_start_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-groups/README.md b/examples/command-groups/README.md index a97c817ff..89ae15005 100644 --- a/examples/command-groups/README.md +++ b/examples/command-groups/README.md @@ -112,9 +112,10 @@ Options: ### `$ ./ftp login` ````shell -# this file is located in 'src/login_command.sh' -# code for 'ftp login' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/login_command.sh'. +# It contains the implementation for the 'ftp login' command. +# The code you write here will be wrapped by a function named 'ftp_login_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none diff --git a/examples/command-groups/src/download_command.sh b/examples/command-groups/src/download_command.sh index d6f4bfd91..1cf093d32 100644 --- a/examples/command-groups/src/download_command.sh +++ b/examples/command-groups/src/download_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/download_command.sh'" -echo "# code for 'ftp download' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/download_command.sh'." +echo "# It contains the implementation for the 'ftp download' command." +echo "# The code you write here will be wrapped by a function named 'ftp_download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-groups/src/login_command.sh b/examples/command-groups/src/login_command.sh index 618339a1a..37f485fee 100644 --- a/examples/command-groups/src/login_command.sh +++ b/examples/command-groups/src/login_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/login_command.sh'" -echo "# code for 'ftp login' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/login_command.sh'." +echo "# It contains the implementation for the 'ftp login' command." +echo "# The code you write here will be wrapped by a function named 'ftp_login_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-groups/src/logout_command.sh b/examples/command-groups/src/logout_command.sh index 835c7b4f1..d2be104ca 100644 --- a/examples/command-groups/src/logout_command.sh +++ b/examples/command-groups/src/logout_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/logout_command.sh'" -echo "# code for 'ftp logout' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/logout_command.sh'." +echo "# It contains the implementation for the 'ftp logout' command." +echo "# The code you write here will be wrapped by a function named 'ftp_logout_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-groups/src/upload_command.sh b/examples/command-groups/src/upload_command.sh index f6058c2f0..4f1d04ed6 100644 --- a/examples/command-groups/src/upload_command.sh +++ b/examples/command-groups/src/upload_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/upload_command.sh'" -echo "# code for 'ftp upload' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/upload_command.sh'." +echo "# It contains the implementation for the 'ftp upload' command." +echo "# The code you write here will be wrapped by a function named 'ftp_upload_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-paths/README.md b/examples/command-paths/README.md index e697a4ca6..75bf632ff 100644 --- a/examples/command-paths/README.md +++ b/examples/command-paths/README.md @@ -140,9 +140,10 @@ Global Options: ### `$ ./docker container run alpine` ````shell -# this file is located in 'src/commands/container/run.sh' -# code for 'docker container run' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/commands/container/run.sh'. +# It contains the implementation for the 'docker container run' command. +# The code you write here will be wrapped by a function named 'docker_container_run_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[image]} = alpine diff --git a/examples/command-paths/src/commands/container/run.sh b/examples/command-paths/src/commands/container/run.sh index 19449991b..2329679fb 100644 --- a/examples/command-paths/src/commands/container/run.sh +++ b/examples/command-paths/src/commands/container/run.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/commands/container/run.sh'" -echo "# code for 'docker container run' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/commands/container/run.sh'." +echo "# It contains the implementation for the 'docker container run' command." +echo "# The code you write here will be wrapped by a function named 'docker_container_run_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-paths/src/commands/container/stop.sh b/examples/command-paths/src/commands/container/stop.sh index 5421017e6..ad57adb39 100644 --- a/examples/command-paths/src/commands/container/stop.sh +++ b/examples/command-paths/src/commands/container/stop.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/commands/container/stop.sh'" -echo "# code for 'docker container stop' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/commands/container/stop.sh'." +echo "# It contains the implementation for the 'docker container stop' command." +echo "# The code you write here will be wrapped by a function named 'docker_container_stop_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-paths/src/commands/image/ls.sh b/examples/command-paths/src/commands/image/ls.sh index bd453b91e..607e112b9 100644 --- a/examples/command-paths/src/commands/image/ls.sh +++ b/examples/command-paths/src/commands/image/ls.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/commands/image/ls.sh'" -echo "# code for 'docker image ls' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/commands/image/ls.sh'." +echo "# It contains the implementation for the 'docker image ls' command." +echo "# The code you write here will be wrapped by a function named 'docker_image_ls_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-paths/src/commands/ps.sh b/examples/command-paths/src/commands/ps.sh index aa7be2476..e0830909c 100644 --- a/examples/command-paths/src/commands/ps.sh +++ b/examples/command-paths/src/commands/ps.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/commands/ps.sh'" -echo "# code for 'docker ps' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/commands/ps.sh'." +echo "# It contains the implementation for the 'docker ps' command." +echo "# The code you write here will be wrapped by a function named 'docker_ps_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-private/README.md b/examples/command-private/README.md index 64531cd0f..937ca6e03 100644 --- a/examples/command-private/README.md +++ b/examples/command-private/README.md @@ -101,9 +101,10 @@ Options: ````shell === Calling ./cli connect-ftp -# this file is located in 'src/connect_ftp_command.sh' -# code for 'cli connect-ftp' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/connect_ftp_command.sh'. +# It contains the implementation for the 'cli connect-ftp' command. +# The code you write here will be wrapped by a function named 'cli_connect_ftp_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none @@ -112,9 +113,10 @@ args: none ### `$ ./cli connect-ssh` ````shell -# this file is located in 'src/connect_ssh_command.sh' -# code for 'cli connect-ssh' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/connect_ssh_command.sh'. +# It contains the implementation for the 'cli connect-ssh' command. +# The code you write here will be wrapped by a function named 'cli_connect_ssh_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none diff --git a/examples/command-private/src/connect_ftp_command.sh b/examples/command-private/src/connect_ftp_command.sh index d436ce49c..80179ca6f 100644 --- a/examples/command-private/src/connect_ftp_command.sh +++ b/examples/command-private/src/connect_ftp_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/connect_ftp_command.sh'" -echo "# code for 'cli connect-ftp' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/connect_ftp_command.sh'." +echo "# It contains the implementation for the 'cli connect-ftp' command." +echo "# The code you write here will be wrapped by a function named 'cli_connect_ftp_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/command-private/src/connect_ssh_command.sh b/examples/command-private/src/connect_ssh_command.sh index 2757688d4..2b25fa2d7 100644 --- a/examples/command-private/src/connect_ssh_command.sh +++ b/examples/command-private/src/connect_ssh_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/connect_ssh_command.sh'" -echo "# code for 'cli connect-ssh' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/connect_ssh_command.sh'." +echo "# It contains the implementation for the 'cli connect-ssh' command." +echo "# The code you write here will be wrapped by a function named 'cli_connect_ssh_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/commands-expose/src/config_edit_command.sh b/examples/commands-expose/src/config_edit_command.sh index b8218ba08..58bbb95af 100644 --- a/examples/commands-expose/src/config_edit_command.sh +++ b/examples/commands-expose/src/config_edit_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/config_edit_command.sh'" -echo "# code for 'cli config edit' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/config_edit_command.sh'." +echo "# It contains the implementation for the 'cli config edit' command." +echo "# The code you write here will be wrapped by a function named 'cli_config_edit_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/commands-expose/src/config_show_command.sh b/examples/commands-expose/src/config_show_command.sh index 8cc9fdaba..4a2b90d9a 100644 --- a/examples/commands-expose/src/config_show_command.sh +++ b/examples/commands-expose/src/config_show_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/config_show_command.sh'" -echo "# code for 'cli config show' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/config_show_command.sh'." +echo "# It contains the implementation for the 'cli config show' command." +echo "# The code you write here will be wrapped by a function named 'cli_config_show_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/commands-expose/src/container_down_command.sh b/examples/commands-expose/src/container_down_command.sh index 224c7c297..c9fd499f9 100644 --- a/examples/commands-expose/src/container_down_command.sh +++ b/examples/commands-expose/src/container_down_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/container_down_command.sh'" -echo "# code for 'cli container down' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/container_down_command.sh'." +echo "# It contains the implementation for the 'cli container down' command." +echo "# The code you write here will be wrapped by a function named 'cli_container_down_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/commands-expose/src/container_exec_command.sh b/examples/commands-expose/src/container_exec_command.sh index dedbcc1a5..1ffb0e559 100644 --- a/examples/commands-expose/src/container_exec_command.sh +++ b/examples/commands-expose/src/container_exec_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/container_exec_command.sh'" -echo "# code for 'cli container exec' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/container_exec_command.sh'." +echo "# It contains the implementation for the 'cli container exec' command." +echo "# The code you write here will be wrapped by a function named 'cli_container_exec_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/commands-expose/src/init_command.sh b/examples/commands-expose/src/init_command.sh index 088900379..7a2cccab9 100644 --- a/examples/commands-expose/src/init_command.sh +++ b/examples/commands-expose/src/init_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/init_command.sh'" -echo "# code for 'cli init' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/init_command.sh'." +echo "# It contains the implementation for the 'cli init' command." +echo "# The code you write here will be wrapped by a function named 'cli_init_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/commands-expose/src/server_start_command.sh b/examples/commands-expose/src/server_start_command.sh index a16752ed4..61f187d71 100644 --- a/examples/commands-expose/src/server_start_command.sh +++ b/examples/commands-expose/src/server_start_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/server_start_command.sh'" -echo "# code for 'cli server start' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/server_start_command.sh'." +echo "# It contains the implementation for the 'cli server start' command." +echo "# The code you write here will be wrapped by a function named 'cli_server_start_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/commands-expose/src/server_stop_command.sh b/examples/commands-expose/src/server_stop_command.sh index 0e1eba64d..0a6f52ce2 100644 --- a/examples/commands-expose/src/server_stop_command.sh +++ b/examples/commands-expose/src/server_stop_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/server_stop_command.sh'" -echo "# code for 'cli server stop' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/server_stop_command.sh'." +echo "# It contains the implementation for the 'cli server stop' command." +echo "# The code you write here will be wrapped by a function named 'cli_server_stop_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/commands-nested/README.md b/examples/commands-nested/README.md index 93ea4f279..71919119c 100644 --- a/examples/commands-nested/README.md +++ b/examples/commands-nested/README.md @@ -274,9 +274,10 @@ Arguments: ### `$ ./cli file edit filename` ````shell -# this file is located in 'src/file_edit_command.sh' -# code for 'cli file edit' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/file_edit_command.sh'. +# It contains the implementation for the 'cli file edit' command. +# The code you write here will be wrapped by a function named 'cli_file_edit_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[path]} = filename diff --git a/examples/commands-nested/src/dir_list_command.sh b/examples/commands-nested/src/dir_list_command.sh index 9a1c5dceb..9a23be53b 100644 --- a/examples/commands-nested/src/dir_list_command.sh +++ b/examples/commands-nested/src/dir_list_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/dir_list_command.sh'" -echo "# code for 'cli dir list' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/dir_list_command.sh'." +echo "# It contains the implementation for the 'cli dir list' command." +echo "# The code you write here will be wrapped by a function named 'cli_dir_list_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/commands-nested/src/dir_remove_command.sh b/examples/commands-nested/src/dir_remove_command.sh index b0e4c2759..74171ee79 100644 --- a/examples/commands-nested/src/dir_remove_command.sh +++ b/examples/commands-nested/src/dir_remove_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/dir_remove_command.sh'" -echo "# code for 'cli dir remove' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/dir_remove_command.sh'." +echo "# It contains the implementation for the 'cli dir remove' command." +echo "# The code you write here will be wrapped by a function named 'cli_dir_remove_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/commands-nested/src/file_edit_command.sh b/examples/commands-nested/src/file_edit_command.sh index d55be0aa2..22f8c1eec 100644 --- a/examples/commands-nested/src/file_edit_command.sh +++ b/examples/commands-nested/src/file_edit_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/file_edit_command.sh'" -echo "# code for 'cli file edit' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/file_edit_command.sh'." +echo "# It contains the implementation for the 'cli file edit' command." +echo "# The code you write here will be wrapped by a function named 'cli_file_edit_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/commands-nested/src/file_show_command.sh b/examples/commands-nested/src/file_show_command.sh index e792edcbc..5d7faecfd 100644 --- a/examples/commands-nested/src/file_show_command.sh +++ b/examples/commands-nested/src/file_show_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/file_show_command.sh'" -echo "# code for 'cli file show' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/file_show_command.sh'." +echo "# It contains the implementation for the 'cli file show' command." +echo "# The code you write here will be wrapped by a function named 'cli_file_show_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/commands/README.md b/examples/commands/README.md index 2c6f1d52b..7be09c18e 100644 --- a/examples/commands/README.md +++ b/examples/commands/README.md @@ -177,9 +177,10 @@ usage: cli download SOURCE [TARGET] [OPTIONS] ### `$ ./cli download sourcefile targetfile -f` ````shell -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--force]} = 1 - ${args[source]} = sourcefile @@ -232,9 +233,10 @@ missing required flag: --user, -u USER ### `$ ./cli upload sourcefile -u username` ````shell -# this file is located in 'src/upload_command.sh' -# code for 'cli upload' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/upload_command.sh'. +# It contains the implementation for the 'cli upload' command. +# The code you write here will be wrapped by a function named 'cli_upload_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = sourcefile - ${args[--user]} = username diff --git a/examples/commands/src/download_command.sh b/examples/commands/src/download_command.sh index 950ed3709..308ab9cf0 100644 --- a/examples/commands/src/download_command.sh +++ b/examples/commands/src/download_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/download_command.sh'" -echo "# code for 'cli download' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/download_command.sh'." +echo "# It contains the implementation for the 'cli download' command." +echo "# The code you write here will be wrapped by a function named 'cli_download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/commands/src/upload_command.sh b/examples/commands/src/upload_command.sh index 755e02ff1..2999ec150 100644 --- a/examples/commands/src/upload_command.sh +++ b/examples/commands/src/upload_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/upload_command.sh'" -echo "# code for 'cli upload' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/upload_command.sh'." +echo "# It contains the implementation for the 'cli upload' command." +echo "# The code you write here will be wrapped by a function named 'cli_upload_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/custom-strings/src/root_command.sh b/examples/custom-strings/src/root_command.sh index 91e643078..28c47a208 100644 --- a/examples/custom-strings/src/root_command.sh +++ b/examples/custom-strings/src/root_command.sh @@ -1,3 +1,5 @@ -echo "# this file is located in 'src/root_command.sh'" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/root_command.sh'." +echo "# It contains the implementation for the 'download' command." +echo "# The code you write here will be wrapped by a function named 'download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/default-values/README.md b/examples/default-values/README.md index 0beb19d3c..b7c7984c0 100644 --- a/examples/default-values/README.md +++ b/examples/default-values/README.md @@ -49,8 +49,10 @@ examples: ### `$ ./convert` ````shell -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'convert' command. +# The code you write here will be wrapped by a function named 'convert_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--format]} = png - ${args[source]} = *.jpg @@ -96,8 +98,10 @@ Examples: ### `$ ./convert *.bmp` ````shell -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'convert' command. +# The code you write here will be wrapped by a function named 'convert_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--format]} = png - ${args[source]} = *.bmp @@ -108,8 +112,10 @@ args: ### `$ ./convert -f pdf` ````shell -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'convert' command. +# The code you write here will be wrapped by a function named 'convert_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--format]} = pdf - ${args[source]} = *.jpg @@ -120,8 +126,10 @@ args: ### `$ ./convert *.pdf --format gif` ````shell -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'convert' command. +# The code you write here will be wrapped by a function named 'convert_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--format]} = gif - ${args[source]} = *.pdf diff --git a/examples/default-values/src/root_command.sh b/examples/default-values/src/root_command.sh index 91e643078..e0cf64c2f 100644 --- a/examples/default-values/src/root_command.sh +++ b/examples/default-values/src/root_command.sh @@ -1,3 +1,5 @@ -echo "# this file is located in 'src/root_command.sh'" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/root_command.sh'." +echo "# It contains the implementation for the 'convert' command." +echo "# The code you write here will be wrapped by a function named 'convert_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/dependencies-alt/README.md b/examples/dependencies-alt/README.md index fcd9fd578..e1beb362b 100644 --- a/examples/dependencies-alt/README.md +++ b/examples/dependencies-alt/README.md @@ -52,9 +52,10 @@ commands: ### `$ ./cli download` ````shell -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none deps: diff --git a/examples/dependencies-alt/src/download_command.sh b/examples/dependencies-alt/src/download_command.sh index 950ed3709..308ab9cf0 100644 --- a/examples/dependencies-alt/src/download_command.sh +++ b/examples/dependencies-alt/src/download_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/download_command.sh'" -echo "# code for 'cli download' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/download_command.sh'." +echo "# It contains the implementation for the 'cli download' command." +echo "# The code you write here will be wrapped by a function named 'cli_download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/dependencies/src/download_command.sh b/examples/dependencies/src/download_command.sh index 950ed3709..308ab9cf0 100644 --- a/examples/dependencies/src/download_command.sh +++ b/examples/dependencies/src/download_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/download_command.sh'" -echo "# code for 'cli download' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/download_command.sh'." +echo "# It contains the implementation for the 'cli download' command." +echo "# The code you write here will be wrapped by a function named 'cli_download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/dependencies/src/upload_command.sh b/examples/dependencies/src/upload_command.sh index 755e02ff1..2999ec150 100644 --- a/examples/dependencies/src/upload_command.sh +++ b/examples/dependencies/src/upload_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/upload_command.sh'" -echo "# code for 'cli upload' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/upload_command.sh'." +echo "# It contains the implementation for the 'cli upload' command." +echo "# The code you write here will be wrapped by a function named 'cli_upload_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/docker-like/README.md b/examples/docker-like/README.md index 640c3da78..e39cca26b 100644 --- a/examples/docker-like/README.md +++ b/examples/docker-like/README.md @@ -173,9 +173,10 @@ usage: docker container run IMAGE ### `$ ./docker -d container run alpine` ````shell -# this file is located in 'src/container_run_command.sh' -# code for 'docker container run' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/container_run_command.sh'. +# It contains the implementation for the 'docker container run' command. +# The code you write here will be wrapped by a function named 'docker_container_run_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--debug]} = 1 - ${args[image]} = alpine @@ -223,9 +224,10 @@ Commands: ### `$ ./docker image ls` ````shell -# this file is located in 'src/image_ls_command.sh' -# code for 'docker image ls' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/image_ls_command.sh'. +# It contains the implementation for the 'docker image ls' command. +# The code you write here will be wrapped by a function named 'docker_image_ls_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none @@ -234,9 +236,10 @@ args: none ### `$ ./docker i l` ````shell -# this file is located in 'src/image_ls_command.sh' -# code for 'docker image ls' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/image_ls_command.sh'. +# It contains the implementation for the 'docker image ls' command. +# The code you write here will be wrapped by a function named 'docker_image_ls_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none @@ -245,9 +248,10 @@ args: none ### `$ ./docker --debug ps --all` ````shell -# this file is located in 'src/ps_command.sh' -# code for 'docker ps' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/ps_command.sh'. +# It contains the implementation for the 'docker ps' command. +# The code you write here will be wrapped by a function named 'docker_ps_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--all]} = 1 - ${args[--debug]} = 1 diff --git a/examples/docker-like/src/container_run_command.sh b/examples/docker-like/src/container_run_command.sh index 41a73ff11..6b7ce0592 100644 --- a/examples/docker-like/src/container_run_command.sh +++ b/examples/docker-like/src/container_run_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/container_run_command.sh'" -echo "# code for 'docker container run' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/container_run_command.sh'." +echo "# It contains the implementation for the 'docker container run' command." +echo "# The code you write here will be wrapped by a function named 'docker_container_run_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/docker-like/src/container_stop_command.sh b/examples/docker-like/src/container_stop_command.sh index 7d79b5fe6..b36379154 100644 --- a/examples/docker-like/src/container_stop_command.sh +++ b/examples/docker-like/src/container_stop_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/container_stop_command.sh'" -echo "# code for 'docker container stop' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/container_stop_command.sh'." +echo "# It contains the implementation for the 'docker container stop' command." +echo "# The code you write here will be wrapped by a function named 'docker_container_stop_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/docker-like/src/image_ls_command.sh b/examples/docker-like/src/image_ls_command.sh index ccf60cd8b..56259efab 100644 --- a/examples/docker-like/src/image_ls_command.sh +++ b/examples/docker-like/src/image_ls_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/image_ls_command.sh'" -echo "# code for 'docker image ls' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/image_ls_command.sh'." +echo "# It contains the implementation for the 'docker image ls' command." +echo "# The code you write here will be wrapped by a function named 'docker_image_ls_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/docker-like/src/ps_command.sh b/examples/docker-like/src/ps_command.sh index 3ba65dee1..811ccd25c 100644 --- a/examples/docker-like/src/ps_command.sh +++ b/examples/docker-like/src/ps_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/ps_command.sh'" -echo "# code for 'docker ps' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/ps_command.sh'." +echo "# It contains the implementation for the 'docker ps' command." +echo "# The code you write here will be wrapped by a function named 'docker_ps_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/extensible-delegate/README.md b/examples/extensible-delegate/README.md index f75f8cd61..12cc0f620 100644 --- a/examples/extensible-delegate/README.md +++ b/examples/extensible-delegate/README.md @@ -61,9 +61,10 @@ Commands: ### `$ ./mygit push` ````shell -# this file is located in 'src/push_command.sh' -# code for 'mygit push' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/push_command.sh'. +# It contains the implementation for the 'mygit push' command. +# The code you write here will be wrapped by a function named 'mygit_push_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none diff --git a/examples/extensible-delegate/src/pull_command.sh b/examples/extensible-delegate/src/pull_command.sh index 8a5f08347..75434d762 100644 --- a/examples/extensible-delegate/src/pull_command.sh +++ b/examples/extensible-delegate/src/pull_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/pull_command.sh'" -echo "# code for 'mygit pull' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/pull_command.sh'." +echo "# It contains the implementation for the 'mygit pull' command." +echo "# The code you write here will be wrapped by a function named 'mygit_pull_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/extensible-delegate/src/push_command.sh b/examples/extensible-delegate/src/push_command.sh index e9353497b..0e05ae240 100644 --- a/examples/extensible-delegate/src/push_command.sh +++ b/examples/extensible-delegate/src/push_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/push_command.sh'" -echo "# code for 'mygit push' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/push_command.sh'." +echo "# It contains the implementation for the 'mygit push' command." +echo "# The code you write here will be wrapped by a function named 'mygit_push_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/extensible/src/download_command.sh b/examples/extensible/src/download_command.sh index 950ed3709..308ab9cf0 100644 --- a/examples/extensible/src/download_command.sh +++ b/examples/extensible/src/download_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/download_command.sh'" -echo "# code for 'cli download' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/download_command.sh'." +echo "# It contains the implementation for the 'cli download' command." +echo "# The code you write here will be wrapped by a function named 'cli_download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/extensible/src/upload_command.sh b/examples/extensible/src/upload_command.sh index 755e02ff1..2999ec150 100644 --- a/examples/extensible/src/upload_command.sh +++ b/examples/extensible/src/upload_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/upload_command.sh'" -echo "# code for 'cli upload' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/upload_command.sh'." +echo "# It contains the implementation for the 'cli upload' command." +echo "# The code you write here will be wrapped by a function named 'cli_upload_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/footer/README.md b/examples/footer/README.md index 2ea0e6303..af61861c0 100644 --- a/examples/footer/README.md +++ b/examples/footer/README.md @@ -36,8 +36,10 @@ args: ### `$ ./download` ````shell -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none diff --git a/examples/footer/src/root_command.sh b/examples/footer/src/root_command.sh index 91e643078..28c47a208 100644 --- a/examples/footer/src/root_command.sh +++ b/examples/footer/src/root_command.sh @@ -1,3 +1,5 @@ -echo "# this file is located in 'src/root_command.sh'" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/root_command.sh'." +echo "# It contains the implementation for the 'download' command." +echo "# The code you write here will be wrapped by a function named 'download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/git-like/README.md b/examples/git-like/README.md index dcbe8606c..d40d13a54 100644 --- a/examples/git-like/README.md +++ b/examples/git-like/README.md @@ -90,9 +90,10 @@ Options: ### `$ ./git s` ````shell -# this file is located in 'src/status_command.sh' -# code for 'git status' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/status_command.sh'. +# It contains the implementation for the 'git status' command. +# The code you write here will be wrapped by a function named 'git_status_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none @@ -145,9 +146,10 @@ Options: ### `$ ./git commit -a -m "initial commit"` ````shell -# this file is located in 'src/commit_command.sh' -# code for 'git commit' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/commit_command.sh'. +# It contains the implementation for the 'git commit' command. +# The code you write here will be wrapped by a function named 'git_commit_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--all]} = 1 - ${args[--message]} = initial commit diff --git a/examples/git-like/src/commit_command.sh b/examples/git-like/src/commit_command.sh index 2ee8284f8..73047bafe 100644 --- a/examples/git-like/src/commit_command.sh +++ b/examples/git-like/src/commit_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/commit_command.sh'" -echo "# code for 'git commit' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/commit_command.sh'." +echo "# It contains the implementation for the 'git commit' command." +echo "# The code you write here will be wrapped by a function named 'git_commit_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/git-like/src/status_command.sh b/examples/git-like/src/status_command.sh index 1bdf3cf75..6757086d0 100644 --- a/examples/git-like/src/status_command.sh +++ b/examples/git-like/src/status_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/status_command.sh'" -echo "# code for 'git status' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/status_command.sh'." +echo "# It contains the implementation for the 'git status' command." +echo "# The code you write here will be wrapped by a function named 'git_status_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/help-command/src/download_command.sh b/examples/help-command/src/download_command.sh index 950ed3709..308ab9cf0 100644 --- a/examples/help-command/src/download_command.sh +++ b/examples/help-command/src/download_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/download_command.sh'" -echo "# code for 'cli download' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/download_command.sh'." +echo "# It contains the implementation for the 'cli download' command." +echo "# The code you write here will be wrapped by a function named 'cli_download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/help-command/src/upload_command.sh b/examples/help-command/src/upload_command.sh index 755e02ff1..2999ec150 100644 --- a/examples/help-command/src/upload_command.sh +++ b/examples/help-command/src/upload_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/upload_command.sh'" -echo "# code for 'cli upload' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/upload_command.sh'." +echo "# It contains the implementation for the 'cli upload' command." +echo "# The code you write here will be wrapped by a function named 'cli_upload_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/minimal/README.md b/examples/minimal/README.md index 8638c396e..29e6f7226 100644 --- a/examples/minimal/README.md +++ b/examples/minimal/README.md @@ -94,8 +94,10 @@ Examples: ### `$ ./download somesource -f` ````shell -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--force]} = 1 - ${args[source]} = somesource diff --git a/examples/minimal/src/root_command.sh b/examples/minimal/src/root_command.sh index 91e643078..28c47a208 100644 --- a/examples/minimal/src/root_command.sh +++ b/examples/minimal/src/root_command.sh @@ -1,3 +1,5 @@ -echo "# this file is located in 'src/root_command.sh'" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/root_command.sh'." +echo "# It contains the implementation for the 'download' command." +echo "# The code you write here will be wrapped by a function named 'download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/minus-v/README.md b/examples/minus-v/README.md index 478ed6be7..e85e22405 100644 --- a/examples/minus-v/README.md +++ b/examples/minus-v/README.md @@ -42,8 +42,10 @@ flags: ### `$ ./cli` ````shell -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none @@ -95,8 +97,10 @@ Options: ### `$ ./cli -v` ````shell -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--verbose]} = 1 @@ -106,8 +110,10 @@ args: ### `$ ./cli -h localhost -v` ````shell -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--host]} = localhost - ${args[--verbose]} = 1 diff --git a/examples/minus-v/src/root_command.sh b/examples/minus-v/src/root_command.sh index 91e643078..de541ffbb 100644 --- a/examples/minus-v/src/root_command.sh +++ b/examples/minus-v/src/root_command.sh @@ -1,3 +1,5 @@ -echo "# this file is located in 'src/root_command.sh'" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/root_command.sh'." +echo "# It contains the implementation for the 'cli' command." +echo "# The code you write here will be wrapped by a function named 'cli_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/multiline/README.md b/examples/multiline/README.md index 6f7b671ad..cf0c9921b 100644 --- a/examples/multiline/README.md +++ b/examples/multiline/README.md @@ -137,9 +137,10 @@ Examples: ### `$ ./multi multiline` ````shell -# this file is located in 'src/multiline_command.sh' -# code for 'multi multiline' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/multiline_command.sh'. +# It contains the implementation for the 'multi multiline' command. +# The code you write here will be wrapped by a function named 'multi_multiline_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none environment variables: diff --git a/examples/multiline/src/multiline_command.sh b/examples/multiline/src/multiline_command.sh index 3d89c7472..fe3bee879 100644 --- a/examples/multiline/src/multiline_command.sh +++ b/examples/multiline/src/multiline_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/multiline_command.sh'" -echo "# code for 'multi multiline' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/multiline_command.sh'." +echo "# It contains the implementation for the 'multi multiline' command." +echo "# The code you write here will be wrapped by a function named 'multi_multiline_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/multiline/src/regular_command.sh b/examples/multiline/src/regular_command.sh index 042cc590c..6ea7b2425 100644 --- a/examples/multiline/src/regular_command.sh +++ b/examples/multiline/src/regular_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/regular_command.sh'" -echo "# code for 'multi regular' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/regular_command.sh'." +echo "# It contains the implementation for the 'multi regular' command." +echo "# The code you write here will be wrapped by a function named 'multi_regular_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/private-reveal/src/admin_list_command.sh b/examples/private-reveal/src/admin_list_command.sh index ee4b95395..df954a36c 100644 --- a/examples/private-reveal/src/admin_list_command.sh +++ b/examples/private-reveal/src/admin_list_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/admin_list_command.sh'" -echo "# code for 'cli admin list' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/admin_list_command.sh'." +echo "# It contains the implementation for the 'cli admin list' command." +echo "# The code you write here will be wrapped by a function named 'cli_admin_list_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/private-reveal/src/admin_reboot_command.sh b/examples/private-reveal/src/admin_reboot_command.sh index e42106330..54732b810 100644 --- a/examples/private-reveal/src/admin_reboot_command.sh +++ b/examples/private-reveal/src/admin_reboot_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/admin_reboot_command.sh'" -echo "# code for 'cli admin reboot' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/admin_reboot_command.sh'." +echo "# It contains the implementation for the 'cli admin reboot' command." +echo "# The code you write here will be wrapped by a function named 'cli_admin_reboot_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/reusable-flags/README.md b/examples/reusable-flags/README.md index b1c05022c..361edc6ab 100644 --- a/examples/reusable-flags/README.md +++ b/examples/reusable-flags/README.md @@ -130,9 +130,10 @@ Options: ### `$ ./cli upload --force` ````shell -# this file is located in 'src/upload_command.sh' -# code for 'cli upload' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/upload_command.sh'. +# It contains the implementation for the 'cli upload' command. +# The code you write here will be wrapped by a function named 'cli_upload_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--force]} = 1 @@ -142,9 +143,10 @@ args: ### `$ ./cli download --debug` ````shell -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--debug]} = 1 diff --git a/examples/reusable-flags/src/download_command.sh b/examples/reusable-flags/src/download_command.sh index 950ed3709..308ab9cf0 100644 --- a/examples/reusable-flags/src/download_command.sh +++ b/examples/reusable-flags/src/download_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/download_command.sh'" -echo "# code for 'cli download' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/download_command.sh'." +echo "# It contains the implementation for the 'cli download' command." +echo "# The code you write here will be wrapped by a function named 'cli_download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/reusable-flags/src/upload_command.sh b/examples/reusable-flags/src/upload_command.sh index 755e02ff1..2999ec150 100644 --- a/examples/reusable-flags/src/upload_command.sh +++ b/examples/reusable-flags/src/upload_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/upload_command.sh'" -echo "# code for 'cli upload' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/upload_command.sh'." +echo "# It contains the implementation for the 'cli upload' command." +echo "# The code you write here will be wrapped by a function named 'cli_upload_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/settings/src/download_command.sh b/examples/settings/src/download_command.sh index 950ed3709..308ab9cf0 100644 --- a/examples/settings/src/download_command.sh +++ b/examples/settings/src/download_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/download_command.sh'" -echo "# code for 'cli download' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/download_command.sh'." +echo "# It contains the implementation for the 'cli download' command." +echo "# The code you write here will be wrapped by a function named 'cli_download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/settings/src/upload_command.sh b/examples/settings/src/upload_command.sh index 755e02ff1..2999ec150 100644 --- a/examples/settings/src/upload_command.sh +++ b/examples/settings/src/upload_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/upload_command.sh'" -echo "# code for 'cli upload' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/upload_command.sh'." +echo "# It contains the implementation for the 'cli upload' command." +echo "# The code you write here will be wrapped by a function named 'cli_upload_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/split-config/src/download_command.sh b/examples/split-config/src/download_command.sh index 950ed3709..308ab9cf0 100644 --- a/examples/split-config/src/download_command.sh +++ b/examples/split-config/src/download_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/download_command.sh'" -echo "# code for 'cli download' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/download_command.sh'." +echo "# It contains the implementation for the 'cli download' command." +echo "# The code you write here will be wrapped by a function named 'cli_download_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/validations/README.md b/examples/validations/README.md index 75c72c47a..ab7b47635 100644 --- a/examples/validations/README.md +++ b/examples/validations/README.md @@ -68,9 +68,10 @@ commands: ### `$ ./validate calc 1 2 --save README.md` ````shell -# this file is located in 'src/calc_command.sh' -# code for 'validate calc' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/calc_command.sh'. +# It contains the implementation for the 'validate calc' command. +# The code you write here will be wrapped by a function named 'validate_calc_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[first]} = 1 - ${args[--save]} = README.md @@ -118,9 +119,10 @@ must be an existing directory ### `$ BUILD_DIR=src ./validate build` ````shell -# this file is located in 'src/build_command.sh' -# code for 'validate build' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/build_command.sh'. +# It contains the implementation for the 'validate build' command. +# The code you write here will be wrapped by a function named 'validate_build_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none environment variables: diff --git a/examples/validations/src/build_command.sh b/examples/validations/src/build_command.sh index ec2f6d2be..7c190211b 100644 --- a/examples/validations/src/build_command.sh +++ b/examples/validations/src/build_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/build_command.sh'" -echo "# code for 'validate build' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/build_command.sh'." +echo "# It contains the implementation for the 'validate build' command." +echo "# The code you write here will be wrapped by a function named 'validate_build_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/validations/src/calc_command.sh b/examples/validations/src/calc_command.sh index e1227645f..4d1af27aa 100644 --- a/examples/validations/src/calc_command.sh +++ b/examples/validations/src/calc_command.sh @@ -1,4 +1,5 @@ -echo "# this file is located in 'src/calc_command.sh'" -echo "# code for 'validate calc' goes here" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/calc_command.sh'." +echo "# It contains the implementation for the 'validate calc' command." +echo "# The code you write here will be wrapped by a function named 'validate_calc_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/examples/whitelist/README.md b/examples/whitelist/README.md index c7b3dd2e0..b0f07b3a7 100644 --- a/examples/whitelist/README.md +++ b/examples/whitelist/README.md @@ -131,8 +131,10 @@ region must be one of: eu, us ### `$ ./login eu --user admin` ````shell -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'login' command. +# The code you write here will be wrapped by a function named 'login_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[environment]} = development - ${args[--protocol]} = ssh @@ -153,8 +155,10 @@ args: ### `$ ./login eu production --user admin --protocol ssh` ````shell -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'login' command. +# The code you write here will be wrapped by a function named 'login_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[environment]} = production - ${args[--protocol]} = ssh diff --git a/examples/whitelist/src/root_command.sh b/examples/whitelist/src/root_command.sh index 91e643078..c924f02c3 100644 --- a/examples/whitelist/src/root_command.sh +++ b/examples/whitelist/src/root_command.sh @@ -1,3 +1,5 @@ -echo "# this file is located in 'src/root_command.sh'" -echo "# you can edit it freely and regenerate (it will not be overwritten)" +echo "# This file is located at 'src/root_command.sh'." +echo "# It contains the implementation for the 'login' command." +echo "# The code you write here will be wrapped by a function named 'login_command()'." +echo "# Feel free to edit this file; your changes will persist when regenerating." inspect_args diff --git a/lib/bashly/commands/generate.rb b/lib/bashly/commands/generate.rb index afc1b7686..e5a1b8dfb 100644 --- a/lib/bashly/commands/generate.rb +++ b/lib/bashly/commands/generate.rb @@ -133,7 +133,7 @@ def create_user_files end def create_root_command_file - create_file "#{Settings.source_dir}/#{command.filename}", command.render(:default_root_script) + create_file "#{Settings.source_dir}/#{command.filename}", command.render(:default_script) end def create_all_command_files diff --git a/lib/bashly/views/command/default_root_script.gtx b/lib/bashly/views/command/default_root_script.gtx deleted file mode 100644 index 1edef2e12..000000000 --- a/lib/bashly/views/command/default_root_script.gtx +++ /dev/null @@ -1,6 +0,0 @@ -> echo "# this file is located in '{{ "#{Settings.source_dir}/#{filename}" }}'" -> echo "# you can edit it freely and regenerate (it will not be overwritten)" -if Settings.enabled? :inspect_args - > inspect_args -end -> diff --git a/lib/bashly/views/command/default_script.gtx b/lib/bashly/views/command/default_script.gtx index 1ec5c4f15..6dfe894af 100644 --- a/lib/bashly/views/command/default_script.gtx +++ b/lib/bashly/views/command/default_script.gtx @@ -1,6 +1,7 @@ -> echo "# this file is located in '{{ "#{Settings.source_dir}/#{filename}" }}'" -> echo "# code for '{{ full_name }}' goes here" -> echo "# you can edit it freely and regenerate (it will not be overwritten)" +> echo "# This file is located at '{{ "#{Settings.source_dir}/#{filename}" }}'." +> echo "# It contains the implementation for the '{{ full_name }}' command." +> echo "# The code you write here will be wrapped by a function named '{{ function_name }}_command()'." +> echo "# Feel free to edit this file; your changes will persist when regenerating." if Settings.enabled? :inspect_args > inspect_args end diff --git a/spec/approvals/examples/catch-all b/spec/approvals/examples/catch-all index cd6b209cb..c247a8dc5 100644 --- a/spec/approvals/examples/catch-all +++ b/spec/approvals/examples/catch-all @@ -29,13 +29,17 @@ Arguments: Message + ./download something -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[message]} = something + ./download something with --additional args -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[message]} = something @@ -45,8 +49,10 @@ other_args: - ${other_args[1]} = --additional - ${other_args[2]} = args + ./download something --debug -- also pass --debug to catch_all -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--debug]} = 1 - ${args[message]} = something diff --git a/spec/approvals/examples/catch-all-advanced b/spec/approvals/examples/catch-all-advanced index 4c0bb2fc7..d0cfd2627 100644 --- a/spec/approvals/examples/catch-all-advanced +++ b/spec/approvals/examples/catch-all-advanced @@ -47,30 +47,34 @@ Examples: cli download example.com ./output -f + ./cli download source -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = source + ./cli download source target -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = source - ${args[target]} = target + ./cli download source target --force -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--force]} = 1 - ${args[source]} = source - ${args[target]} = target + ./cli download source target --force -abc --option=value -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--force]} = 1 - ${args[source]} = source @@ -84,9 +88,10 @@ other_args: - ${other_args[3]} = --option - ${other_args[4]} = value + ./cli download source target --force -- -abc --option=value -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--force]} = 1 - ${args[source]} = source @@ -117,9 +122,10 @@ Arguments: missing required argument: FILES... usage: cli upload [--] FILES... + ./cli upload file1 'file 2' file3 -# this file is located in 'src/upload_command.sh' -# code for 'cli upload' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/upload_command.sh'. +# It contains the implementation for the 'cli upload' command. +# The code you write here will be wrapped by a function named 'cli_upload_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none other_args: diff --git a/spec/approvals/examples/command-aliases b/spec/approvals/examples/command-aliases index 462c195bb..4419a2a7d 100644 --- a/spec/approvals/examples/command-aliases +++ b/spec/approvals/examples/command-aliases @@ -64,9 +64,10 @@ Examples: cli d example.com ./output + ./cli d somefile -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = somefile @@ -117,9 +118,10 @@ Examples: cli u README.md + ./cli push somefile -# this file is located in 'src/upload_command.sh' -# code for 'cli upload' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/upload_command.sh'. +# It contains the implementation for the 'cli upload' command. +# The code you write here will be wrapped by a function named 'cli_upload_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = somefile diff --git a/spec/approvals/examples/command-default b/spec/approvals/examples/command-default index 5b8ac2b9e..439049ca4 100644 --- a/spec/approvals/examples/command-default +++ b/spec/approvals/examples/command-default @@ -36,9 +36,10 @@ Options: Show version number + ./ftp download something -# this file is located in 'src/download_command.sh' -# code for 'ftp download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'ftp download' command. +# The code you write here will be wrapped by a function named 'ftp_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = something + ./ftp upload @@ -62,14 +63,16 @@ Arguments: File to upload + ./ftp upload something -# this file is located in 'src/upload_command.sh' -# code for 'ftp upload' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/upload_command.sh'. +# It contains the implementation for the 'ftp upload' command. +# The code you write here will be wrapped by a function named 'ftp_upload_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = something + ./ftp something -# this file is located in 'src/upload_command.sh' -# code for 'ftp upload' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/upload_command.sh'. +# It contains the implementation for the 'ftp upload' command. +# The code you write here will be wrapped by a function named 'ftp_upload_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = something diff --git a/spec/approvals/examples/command-default-force b/spec/approvals/examples/command-default-force index 2cf79922e..7d9fa6ebc 100644 --- a/spec/approvals/examples/command-default-force +++ b/spec/approvals/examples/command-default-force @@ -24,14 +24,16 @@ Options: Show version number + ./tester -# this file is located in 'src/all_command.sh' -# code for 'tester all' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/all_command.sh'. +# It contains the implementation for the 'tester all' command. +# The code you write here will be wrapped by a function named 'tester_all_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none + ./tester all -# this file is located in 'src/all_command.sh' -# code for 'tester all' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/all_command.sh'. +# It contains the implementation for the 'tester all' command. +# The code you write here will be wrapped by a function named 'tester_all_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none + ./tester all -h tester all - Run all tests @@ -45,8 +47,9 @@ Options: Show this help + ./tester only one -# this file is located in 'src/only_command.sh' -# code for 'tester only' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/only_command.sh'. +# It contains the implementation for the 'tester only' command. +# The code you write here will be wrapped by a function named 'tester_only_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[search]} = one diff --git a/spec/approvals/examples/command-filenames b/spec/approvals/examples/command-filenames index 05fbb1a1b..c6fee75be 100644 --- a/spec/approvals/examples/command-filenames +++ b/spec/approvals/examples/command-filenames @@ -38,7 +38,8 @@ Options: Show version number + ./cli dir list -# this file is located in 'src/dir_commands/list.sh' -# code for 'cli dir list' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/dir_commands/list.sh'. +# It contains the implementation for the 'cli dir list' command. +# The code you write here will be wrapped by a function named 'cli_dir_list_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none diff --git a/spec/approvals/examples/command-groups b/spec/approvals/examples/command-groups index bd0b9d9e6..1f6d981ab 100644 --- a/spec/approvals/examples/command-groups +++ b/spec/approvals/examples/command-groups @@ -46,7 +46,8 @@ Options: Show version number + ./ftp login -# this file is located in 'src/login_command.sh' -# code for 'ftp login' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/login_command.sh'. +# It contains the implementation for the 'ftp login' command. +# The code you write here will be wrapped by a function named 'ftp_login_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none diff --git a/spec/approvals/examples/command-paths b/spec/approvals/examples/command-paths index 858245885..e91fe92a5 100644 --- a/spec/approvals/examples/command-paths +++ b/spec/approvals/examples/command-paths @@ -43,9 +43,10 @@ Global Options: Show version number + ./docker container run alpine -# this file is located in 'src/commands/container/run.sh' -# code for 'docker container run' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/commands/container/run.sh'. +# It contains the implementation for the 'docker container run' command. +# The code you write here will be wrapped by a function named 'docker_container_run_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[image]} = alpine + ls -R src diff --git a/spec/approvals/examples/command-private b/spec/approvals/examples/command-private index 563bf1e3c..cfe94625c 100644 --- a/spec/approvals/examples/command-private +++ b/spec/approvals/examples/command-private @@ -36,14 +36,16 @@ Options: + ./cli connect ftp === Calling ./cli connect-ftp -# this file is located in 'src/connect_ftp_command.sh' -# code for 'cli connect-ftp' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/connect_ftp_command.sh'. +# It contains the implementation for the 'cli connect-ftp' command. +# The code you write here will be wrapped by a function named 'cli_connect_ftp_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none + ./cli connect-ssh -# this file is located in 'src/connect_ssh_command.sh' -# code for 'cli connect-ssh' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/connect_ssh_command.sh'. +# It contains the implementation for the 'cli connect-ssh' command. +# The code you write here will be wrapped by a function named 'cli_connect_ssh_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none + ./cli connect-ftp --help cli connect-ftp - Connect via FTP diff --git a/spec/approvals/examples/commands b/spec/approvals/examples/commands index f114bc1a2..e0953a0e0 100644 --- a/spec/approvals/examples/commands +++ b/spec/approvals/examples/commands @@ -76,9 +76,10 @@ Examples: missing required argument: SOURCE usage: cli download SOURCE [TARGET] [OPTIONS] + ./cli download sourcefile targetfile -f -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--force]} = 1 - ${args[source]} = sourcefile @@ -113,9 +114,10 @@ Arguments: + ./cli upload sourcefile missing required flag: --user, -u USER + ./cli upload sourcefile -u username -# this file is located in 'src/upload_command.sh' -# code for 'cli upload' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/upload_command.sh'. +# It contains the implementation for the 'cli upload' command. +# The code you write here will be wrapped by a function named 'cli_upload_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = sourcefile - ${args[--user]} = username diff --git a/spec/approvals/examples/commands-nested b/spec/approvals/examples/commands-nested index 0a11049da..1aec48de1 100644 --- a/spec/approvals/examples/commands-nested +++ b/spec/approvals/examples/commands-nested @@ -138,8 +138,9 @@ Arguments: Path to file + ./cli file edit filename -# this file is located in 'src/file_edit_command.sh' -# code for 'cli file edit' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/file_edit_command.sh'. +# It contains the implementation for the 'cli file edit' command. +# The code you write here will be wrapped by a function named 'cli_file_edit_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[path]} = filename diff --git a/spec/approvals/examples/default-values b/spec/approvals/examples/default-values index 4fd1c3945..9e7d9a0b6 100644 --- a/spec/approvals/examples/default-values +++ b/spec/approvals/examples/default-values @@ -4,8 +4,10 @@ created src/root_command.sh created ./convert run ./convert --help to test your bash script + ./convert -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'convert' command. +# The code you write here will be wrapped by a function named 'convert_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--format]} = png - ${args[source]} = *.jpg @@ -39,20 +41,26 @@ Examples: convert *.bmp --format jpg + ./convert '*.bmp' -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'convert' command. +# The code you write here will be wrapped by a function named 'convert_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--format]} = png - ${args[source]} = *.bmp + ./convert -f pdf -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'convert' command. +# The code you write here will be wrapped by a function named 'convert_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--format]} = pdf - ${args[source]} = *.jpg + ./convert '*.pdf' --format gif -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'convert' command. +# The code you write here will be wrapped by a function named 'convert_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--format]} = gif - ${args[source]} = *.pdf diff --git a/spec/approvals/examples/dependencies-alt b/spec/approvals/examples/dependencies-alt index b3d554f3e..4be3370f8 100644 --- a/spec/approvals/examples/dependencies-alt +++ b/spec/approvals/examples/dependencies-alt @@ -6,9 +6,10 @@ created src/download_command.sh created ./cli run ./cli --help to test your bash script + ./cli download -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none deps: diff --git a/spec/approvals/examples/docker-like b/spec/approvals/examples/docker-like index 7ec21e3d9..688886969 100644 --- a/spec/approvals/examples/docker-like +++ b/spec/approvals/examples/docker-like @@ -74,9 +74,10 @@ Arguments: missing required argument: IMAGE usage: docker container run IMAGE + ./docker -d container run alpine -# this file is located in 'src/container_run_command.sh' -# code for 'docker container run' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/container_run_command.sh'. +# It contains the implementation for the 'docker container run' command. +# The code you write here will be wrapped by a function named 'docker_container_run_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--debug]} = 1 - ${args[image]} = alpine @@ -106,19 +107,22 @@ Commands: ls Show all images + ./docker image ls -# this file is located in 'src/image_ls_command.sh' -# code for 'docker image ls' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/image_ls_command.sh'. +# It contains the implementation for the 'docker image ls' command. +# The code you write here will be wrapped by a function named 'docker_image_ls_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none + ./docker i l -# this file is located in 'src/image_ls_command.sh' -# code for 'docker image ls' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/image_ls_command.sh'. +# It contains the implementation for the 'docker image ls' command. +# The code you write here will be wrapped by a function named 'docker_image_ls_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none + ./docker --debug ps --all -# this file is located in 'src/ps_command.sh' -# code for 'docker ps' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/ps_command.sh'. +# It contains the implementation for the 'docker ps' command. +# The code you write here will be wrapped by a function named 'docker_ps_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--all]} = 1 - ${args[--debug]} = 1 diff --git a/spec/approvals/examples/extensible-delegate b/spec/approvals/examples/extensible-delegate index 0427cc78a..c8729c142 100644 --- a/spec/approvals/examples/extensible-delegate +++ b/spec/approvals/examples/extensible-delegate @@ -17,9 +17,10 @@ Commands: pull Pull from my repository + ./mygit push -# this file is located in 'src/push_command.sh' -# code for 'mygit push' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/push_command.sh'. +# It contains the implementation for the 'mygit push' command. +# The code you write here will be wrapped by a function named 'mygit_push_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none + ./mygit rm some-file-that-doesnt-exist fatal: pathspec 'some-file-that-doesnt-exist' did not match any files diff --git a/spec/approvals/examples/footer b/spec/approvals/examples/footer index f009b571d..89498a1f2 100644 --- a/spec/approvals/examples/footer +++ b/spec/approvals/examples/footer @@ -4,8 +4,10 @@ created src/root_command.sh created ./download run ./download --help to test your bash script + ./download -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none + ./download -h download - Sample application with a help footer diff --git a/spec/approvals/examples/git-like b/spec/approvals/examples/git-like index 7578e528a..35153fef1 100644 --- a/spec/approvals/examples/git-like +++ b/spec/approvals/examples/git-like @@ -36,9 +36,10 @@ Options: Show version number + ./git s -# this file is located in 'src/status_command.sh' -# code for 'git status' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/status_command.sh'. +# It contains the implementation for the 'git status' command. +# The code you write here will be wrapped by a function named 'git_status_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none + ./git status -h git status - Show repository status @@ -73,9 +74,10 @@ Options: Show this help + ./git commit -a -m 'initial commit' -# this file is located in 'src/commit_command.sh' -# code for 'git commit' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/commit_command.sh'. +# It contains the implementation for the 'git commit' command. +# The code you write here will be wrapped by a function named 'git_commit_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--all]} = 1 - ${args[--message]} = initial commit diff --git a/spec/approvals/examples/minimal b/spec/approvals/examples/minimal index f943dbc35..0d0c08567 100644 --- a/spec/approvals/examples/minimal +++ b/spec/approvals/examples/minimal @@ -38,8 +38,10 @@ Examples: + ./download -v 0.1.0 + ./download somesource -f -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--force]} = 1 - ${args[source]} = somesource diff --git a/spec/approvals/examples/minus-v b/spec/approvals/examples/minus-v index 24f191753..922569b05 100644 --- a/spec/approvals/examples/minus-v +++ b/spec/approvals/examples/minus-v @@ -4,8 +4,10 @@ created src/root_command.sh created ./cli run ./cli --help to test your bash script + ./cli -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none + ./cli --help cli - Example that replaces the default behavior of -v and -h @@ -33,13 +35,17 @@ Options: + ./cli -h --host requires an argument: --host, -h HOST + ./cli -v -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--verbose]} = 1 + ./cli -h localhost -v -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--host]} = localhost - ${args[--verbose]} = 1 diff --git a/spec/approvals/examples/multiline b/spec/approvals/examples/multiline index e43931bcf..3476d1cdc 100644 --- a/spec/approvals/examples/multiline +++ b/spec/approvals/examples/multiline @@ -53,9 +53,10 @@ Examples: multi multiline --flag + ./multi multiline -# this file is located in 'src/multiline_command.sh' -# code for 'multi multiline' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/multiline_command.sh'. +# It contains the implementation for the 'multi multiline' command. +# The code you write here will be wrapped by a function named 'multi_multiline_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none environment variables: diff --git a/spec/approvals/examples/reusable-flags b/spec/approvals/examples/reusable-flags index 754b7b00d..f5fec6198 100644 --- a/spec/approvals/examples/reusable-flags +++ b/spec/approvals/examples/reusable-flags @@ -61,14 +61,16 @@ Options: Show this help + ./cli upload --force -# this file is located in 'src/upload_command.sh' -# code for 'cli upload' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/upload_command.sh'. +# It contains the implementation for the 'cli upload' command. +# The code you write here will be wrapped by a function named 'cli_upload_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--force]} = 1 + ./cli download --debug -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--debug]} = 1 diff --git a/spec/approvals/examples/validations b/spec/approvals/examples/validations index ffe232f9f..f1899faa9 100644 --- a/spec/approvals/examples/validations +++ b/spec/approvals/examples/validations @@ -10,9 +10,10 @@ created src/build_command.sh created ./validate run ./validate --help to test your bash script + ./validate calc 1 2 --save README.md -# this file is located in 'src/calc_command.sh' -# code for 'validate calc' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/calc_command.sh'. +# It contains the implementation for the 'validate calc' command. +# The code you write here will be wrapped by a function named 'validate_calc_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[first]} = 1 - ${args[--save]} = README.md @@ -31,9 +32,10 @@ validation error in environment variable BUILD_DIR: must be an existing directory + BUILD_DIR=src + ./validate build -# this file is located in 'src/build_command.sh' -# code for 'validate build' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/build_command.sh'. +# It contains the implementation for the 'validate build' command. +# The code you write here will be wrapped by a function named 'validate_build_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none environment variables: diff --git a/spec/approvals/examples/whitelist b/spec/approvals/examples/whitelist index ecaba6d92..268c32c4d 100644 --- a/spec/approvals/examples/whitelist +++ b/spec/approvals/examples/whitelist @@ -47,8 +47,10 @@ region must be one of: eu, us + ./login eu --user hacker --user must be one of: user, admin + ./login eu --user admin -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'login' command. +# The code you write here will be wrapped by a function named 'login_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[environment]} = development - ${args[--protocol]} = ssh @@ -57,8 +59,10 @@ args: + ./login us --user user --protocol icmp --protocol must be one of: ftp, ssh, http + ./login eu production --user admin --protocol ssh -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'login' command. +# The code you write here will be wrapped by a function named 'login_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[environment]} = production - ${args[--protocol]} = ssh diff --git a/spec/approvals/fixtures/catch-all-no-args b/spec/approvals/fixtures/catch-all-no-args index a8c60fa93..69b469c4d 100644 --- a/spec/approvals/fixtures/catch-all-no-args +++ b/spec/approvals/fixtures/catch-all-no-args @@ -4,8 +4,10 @@ created src/root_command.sh created ./download run ./download --help to test your bash script + ./download -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none + ./download --help download - Download something diff --git a/spec/approvals/fixtures/default-command-flag-only b/spec/approvals/fixtures/default-command-flag-only index b838385b1..fc2ef4827 100644 --- a/spec/approvals/fixtures/default-command-flag-only +++ b/spec/approvals/fixtures/default-command-flag-only @@ -4,21 +4,24 @@ created src/get_command.sh created ./cli run ./cli --help to test your bash script + ./cli -# this file is located in 'src/get_command.sh' -# code for 'cli get' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/get_command.sh'. +# It contains the implementation for the 'cli get' command. +# The code you write here will be wrapped by a function named 'cli_get_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none + ./cli -fd -# this file is located in 'src/get_command.sh' -# code for 'cli get' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/get_command.sh'. +# It contains the implementation for the 'cli get' command. +# The code you write here will be wrapped by a function named 'cli_get_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--debug]} = 1 - ${args[--force]} = 1 + ./cli source -fd -# this file is located in 'src/get_command.sh' -# code for 'cli get' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/get_command.sh'. +# It contains the implementation for the 'cli get' command. +# The code you write here will be wrapped by a function named 'cli_get_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--debug]} = 1 - ${args[--force]} = 1 diff --git a/spec/approvals/fixtures/default-validations b/spec/approvals/fixtures/default-validations index 2f93b72dc..41cc0b332 100644 --- a/spec/approvals/fixtures/default-validations +++ b/spec/approvals/fixtures/default-validations @@ -13,8 +13,10 @@ must be an existing file validation error in --template, -t FILE: must be an existing file + ./cli README.md --template cli -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[file]} = README.md - ${args[--template]} = cli diff --git a/spec/approvals/fixtures/environment-variables-initialize b/spec/approvals/fixtures/environment-variables-initialize index 7e130bd7f..0c479b7c6 100644 --- a/spec/approvals/fixtures/environment-variables-initialize +++ b/spec/approvals/fixtures/environment-variables-initialize @@ -11,9 +11,10 @@ missing required environment variable: CONFIG_PATH + ./cli download source PASS: API_KEY=must-be-available-in-initialize PASS: NESTED_VAR is empty -# this file is located in 'src/download_command.sh' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.sh'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = source diff --git a/spec/approvals/fixtures/flag-args-with-dash b/spec/approvals/fixtures/flag-args-with-dash index 1ad65c50d..2dd03ae57 100644 --- a/spec/approvals/fixtures/flag-args-with-dash +++ b/spec/approvals/fixtures/flag-args-with-dash @@ -6,13 +6,17 @@ run ./argflag --help to test your bash script + ./argflag -f -o --options requires an argument: --options, -o LIST + ./argflag -o -f -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'argflag' command. +# The code you write here will be wrapped by a function named 'argflag_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--options]} = -f + ./argflag -o '--verbose --anything' -f -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'argflag' command. +# The code you write here will be wrapped by a function named 'argflag_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--force]} = 1 - ${args[--options]} = --verbose --anything @@ -23,12 +27,16 @@ skipped src/root_command.sh (exists) created ./argflag run ./argflag --help to test your bash script + ./argflag -o -force -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'argflag' command. +# The code you write here will be wrapped by a function named 'argflag_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--options]} = -force + ./argflag -o '-f -o' -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'argflag' command. +# The code you write here will be wrapped by a function named 'argflag_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--options]} = -f -o diff --git a/spec/approvals/fixtures/flag-notation b/spec/approvals/fixtures/flag-notation index 53e97c86a..745048dc8 100644 --- a/spec/approvals/fixtures/flag-notation +++ b/spec/approvals/fixtures/flag-notation @@ -4,25 +4,33 @@ created src/root_command.sh created ./flags run ./flags --help to test your bash script + ./flags -abC -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'flags' command. +# The code you write here will be wrapped by a function named 'flags_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--alfa]} = 1 - ${args[--bravo]} = 1 - ${args[--charlie]} = 1 + ./flags -d=2 -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'flags' command. +# The code you write here will be wrapped by a function named 'flags_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--delta]} = 2 + ./flags --echo=2 -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'flags' command. +# The code you write here will be wrapped by a function named 'flags_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--echo]} = 2 + ./flags '-E=- hello world' -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'flags' command. +# The code you write here will be wrapped by a function named 'flags_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--echo]} = - hello world + ./flags -abCd diff --git a/spec/approvals/fixtures/flag-private b/spec/approvals/fixtures/flag-private index 8772fcdd2..d0530a78d 100644 --- a/spec/approvals/fixtures/flag-private +++ b/spec/approvals/fixtures/flag-private @@ -4,8 +4,10 @@ created src/root_command.sh created ./cli run ./cli --help to test your bash script + ./cli -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--log]} = 3 + ./cli --help @@ -27,7 +29,9 @@ Options: Show version number + ./cli --log 5 -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--log]} = 5 diff --git a/spec/approvals/fixtures/global-flags b/spec/approvals/fixtures/global-flags index 6ce806c27..4b933818d 100644 --- a/spec/approvals/fixtures/global-flags +++ b/spec/approvals/fixtures/global-flags @@ -36,15 +36,17 @@ missing required flag: --charlie, -c NAME + ./flags -c clark show --charlie must be one of: chaplin + ./flags -c chaplin show -# this file is located in 'src/show_command.sh' -# code for 'flags show' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/show_command.sh'. +# It contains the implementation for the 'flags show' command. +# The code you write here will be wrapped by a function named 'flags_show_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--charlie]} = chaplin + ./flags -c chaplin -ab show -# this file is located in 'src/show_command.sh' -# code for 'flags show' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/show_command.sh'. +# It contains the implementation for the 'flags show' command. +# The code you write here will be wrapped by a function named 'flags_show_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--alpha]} = 1 - ${args[--bravo]} = 1 diff --git a/spec/approvals/fixtures/partials-extension b/spec/approvals/fixtures/partials-extension index 692ece4d7..bf5673790 100644 --- a/spec/approvals/fixtures/partials-extension +++ b/spec/approvals/fixtures/partials-extension @@ -97,9 +97,10 @@ Environment Variables: Set your API key + ./cli download something -# this file is located in 'src/download_command.bash' -# code for 'cli download' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/download_command.bash'. +# It contains the implementation for the 'cli download' command. +# The code you write here will be wrapped by a function named 'cli_download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[source]} = something diff --git a/spec/approvals/fixtures/repeatable-arg-validations b/spec/approvals/fixtures/repeatable-arg-validations index 768463d41..c7c37fa20 100644 --- a/spec/approvals/fixtures/repeatable-arg-validations +++ b/spec/approvals/fixtures/repeatable-arg-validations @@ -4,12 +4,16 @@ created src/root_command.sh created ./cli run ./cli --help to test your bash script + ./cli -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none + ./cli 1 -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[number]} = 1 + ./cli 1.1 @@ -19,8 +23,10 @@ must be an integer validation error in NUMBER: must be an integer + ./cli 1 2 -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[number]} = 1 2 + ./cli 1.1 2 diff --git a/spec/approvals/fixtures/repeatable-flag-validations b/spec/approvals/fixtures/repeatable-flag-validations index fe6f4693a..a1f40e14c 100644 --- a/spec/approvals/fixtures/repeatable-flag-validations +++ b/spec/approvals/fixtures/repeatable-flag-validations @@ -4,12 +4,16 @@ created src/root_command.sh created ./cli run ./cli --help to test your bash script + ./cli -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none + ./cli --number 1 -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--number]} = 1 + ./cli --number 1.1 @@ -19,8 +23,10 @@ must be an integer validation error in --number, -n NUMBER: must be an integer + ./cli --number 1 --number 2 -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--number]} = 1 2 + ./cli --number 1.1 --number 2 diff --git a/spec/approvals/fixtures/repeatable-whitelist b/spec/approvals/fixtures/repeatable-whitelist index d14d5ca5b..2f4db6cd6 100644 --- a/spec/approvals/fixtures/repeatable-whitelist +++ b/spec/approvals/fixtures/repeatable-whitelist @@ -4,18 +4,24 @@ created src/root_command.sh created ./download run ./download --help to test your bash script + ./download -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--protocol]} = ftp + ./download -p ssh -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--protocol]} = ssh + ./download -p ssh -p ftp -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--protocol]} = ssh ftp + ./download -p sftp -p https diff --git a/spec/approvals/fixtures/required-args-order b/spec/approvals/fixtures/required-args-order index de086940e..7b07e79ce 100644 --- a/spec/approvals/fixtures/required-args-order +++ b/spec/approvals/fixtures/required-args-order @@ -12,31 +12,39 @@ usage: download PROTOCOL PORT [BODY] [OPTIONS] + ./download http 3000 missing required flag: --method NAME + ./download http 3000 --method GET -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--method]} = GET - ${args[port]} = 3000 - ${args[protocol]} = http + ./download http 3000 --method GET --role admin -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--method]} = GET - ${args[port]} = 3000 - ${args[protocol]} = http - ${args[--role]} = admin + ./download http --role admin --method GET 3000 -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--method]} = GET - ${args[port]} = 3000 - ${args[protocol]} = http - ${args[--role]} = admin + ./download --role admin --method GET http 3000 -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'download' command. +# The code you write here will be wrapped by a function named 'download_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[--method]} = GET - ${args[port]} = 3000 diff --git a/spec/approvals/fixtures/short-command-code b/spec/approvals/fixtures/short-command-code index fb2954961..bf8999344 100644 --- a/spec/approvals/fixtures/short-command-code +++ b/spec/approvals/fixtures/short-command-code @@ -5,9 +5,10 @@ created src/get_command.sh created ./rush run ./rush --help to test your bash script + ./rush c -# this file is located in 'src/config_command.sh' -# code for 'rush config' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/config_command.sh'. +# It contains the implementation for the 'rush config' command. +# The code you write here will be wrapped by a function named 'rush_config_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none + ./rush g missing required argument: REPO diff --git a/spec/approvals/fixtures/short-flag b/spec/approvals/fixtures/short-flag index a7d6023e9..ec28fedce 100644 --- a/spec/approvals/fixtures/short-flag +++ b/spec/approvals/fixtures/short-flag @@ -6,14 +6,18 @@ run ./cli --help to test your bash script + ./cli missing required flag: -o PATH + ./cli -o /tmp -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[-f]} = html - ${args[-o]} = /tmp + ./cli -o /tmp -f json -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[-f]} = json - ${args[-o]} = /tmp diff --git a/spec/approvals/fixtures/validation-functions b/spec/approvals/fixtures/validation-functions index e25af0809..4ed3fae03 100644 --- a/spec/approvals/fixtures/validation-functions +++ b/spec/approvals/fixtures/validation-functions @@ -9,16 +9,20 @@ created src/root_command.sh created ./validate run ./validate --help to test your bash script + ./validate 1 -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'validate' command. +# The code you write here will be wrapped by a function named 'validate_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[integer_arg]} = 1 + ./validate A validation error in INTEGER_ARG: must be an integer + ./validate 1 README.md -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'validate' command. +# The code you write here will be wrapped by a function named 'validate_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[file_exists_arg]} = README.md - ${args[integer_arg]} = 1 @@ -26,8 +30,10 @@ args: validation error in FILE_EXISTS_ARG: must be an existing file + ./validate 1 README.md src -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'validate' command. +# The code you write here will be wrapped by a function named 'validate_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[dir_exists_arg]} = src - ${args[file_exists_arg]} = README.md @@ -36,8 +42,10 @@ args: validation error in DIR_EXISTS_ARG: must be an existing directory + ./validate 1 README.md src non-empty -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'validate' command. +# The code you write here will be wrapped by a function named 'validate_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[dir_exists_arg]} = src - ${args[file_exists_arg]} = README.md diff --git a/spec/approvals/fixtures/version-in-subcommands b/spec/approvals/fixtures/version-in-subcommands index 245b7663a..0a66ab7b5 100644 --- a/spec/approvals/fixtures/version-in-subcommands +++ b/spec/approvals/fixtures/version-in-subcommands @@ -24,18 +24,20 @@ Options: Show version number + ./cli git --version -# this file is located in 'src/git_command.sh' -# code for 'cli git' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/git_command.sh'. +# It contains the implementation for the 'cli git' command. +# The code you write here will be wrapped by a function named 'cli_git_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none other_args: - ${other_args[*]} = --version - ${other_args[0]} = --version + ./cli git any 'other args' -or --flags -# this file is located in 'src/git_command.sh' -# code for 'cli git' goes here -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/git_command.sh'. +# It contains the implementation for the 'cli git' command. +# The code you write here will be wrapped by a function named 'cli_git_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none other_args: diff --git a/spec/approvals/fixtures/whitelist-optional b/spec/approvals/fixtures/whitelist-optional index 0d6e93923..418926953 100644 --- a/spec/approvals/fixtures/whitelist-optional +++ b/spec/approvals/fixtures/whitelist-optional @@ -4,8 +4,10 @@ created src/root_command.sh created ./cli run ./cli --help to test your bash script + ./cli -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: none + ./cli -h cli - Test that whitelist can be optional and without a default value @@ -36,8 +38,10 @@ action must be one of: push, commit + ./cli --notify snail_mail --notify must be one of: slack, webhook + ./cli push --notify slack -# this file is located in 'src/root_command.sh' -# you can edit it freely and regenerate (it will not be overwritten) +# This file is located at 'src/root_command.sh'. +# It contains the implementation for the 'cli' command. +# The code you write here will be wrapped by a function named 'cli_command()'. +# Feel free to edit this file; your changes will persist when regenerating. args: - ${args[action]} = push - ${args[--notify]} = slack