Skip to content

Commit

Permalink
Merge pull request #593 from DannyBen/update/default-script-header
Browse files Browse the repository at this point in the history
Update default script header
  • Loading branch information
DannyBen authored Dec 28, 2024
2 parents 1da194d + c85276c commit 1db7847
Show file tree
Hide file tree
Showing 140 changed files with 861 additions and 584 deletions.
42 changes: 24 additions & 18 deletions examples/catch-all-advanced/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
7 changes: 4 additions & 3 deletions examples/catch-all-advanced/src/download_command.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions examples/catch-all-advanced/src/upload_command.sh
Original file line number Diff line number Diff line change
@@ -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
18 changes: 12 additions & 6 deletions examples/catch-all/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions examples/catch-all/src/root_command.sh
Original file line number Diff line number Diff line change
@@ -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
14 changes: 8 additions & 6 deletions examples/command-aliases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
7 changes: 4 additions & 3 deletions examples/command-aliases/src/download_command.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions examples/command-aliases/src/upload_command.sh
Original file line number Diff line number Diff line change
@@ -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
21 changes: 12 additions & 9 deletions examples/command-default-force/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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


Expand All @@ -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

Expand Down
7 changes: 4 additions & 3 deletions examples/command-default-force/src/all_command.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions examples/command-default-force/src/only_command.sh
Original file line number Diff line number Diff line change
@@ -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
21 changes: 12 additions & 9 deletions examples/command-default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down
7 changes: 4 additions & 3 deletions examples/command-default/src/download_command.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions examples/command-default/src/upload_command.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions examples/command-examples-on-error/src/download_command.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions examples/command-examples-on-error/src/upload_command.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions examples/command-examples/src/download_command.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions examples/command-examples/src/upload_command.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions examples/command-filenames/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
7 changes: 4 additions & 3 deletions examples/command-filenames/src/dir_commands/list.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions examples/command-filenames/src/dir_commands/remove.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions examples/command-filenames/src/file_commands/edit.sh
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit 1db7847

Please sign in to comment.