Skip to content

Commit 0625fb0

Browse files
committed
docs: add examples
1 parent 3b3c008 commit 0625fb0

File tree

4 files changed

+68
-0
lines changed

4 files changed

+68
-0
lines changed

examples/bashblog.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
# https://github.com/cfenollosa/bashblog
4+
5+
source ./bin/args-init
6+
7+
args.parse <<"EOF"
8+
@arg post - insert a new blog post, or the filename of a draft to continue editing it. it tries to use markdown by default, and falls back to HTML if it's not available. use '-html' to override it and edit the post as HTML even when markdown is available
9+
@arg edit - edit an already published .html or .md file. **NEVER** edit manually a published .html file, always use this function as it keeps internal data and rebuilds the blog. use '-n' to give the file a new name, if title was changed. use '-f' to edit full html file, instead of just text part (also preserves name)
10+
@arg delete - deletes the post and rebuilds the blog
11+
@arg rebuild - deletes the post and rebuilds the blog
12+
@arg reset - deletes everything except this script. Use with a lot of caution and back up first!
13+
@arg list - list all posts
14+
@arg tags - list all tags in alphabetical order. use '-n' to sort list by number of posts
15+
16+
EOF
17+
18+
printf "%s" "$argsHelpText"

examples/basher.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
# https://github.com/basherpm/basher
4+
5+
source ./bin/args-init
6+
7+
args.parse <<"EOF"
8+
@arg help - Display help for a command
9+
@arg commands - List all available basher commands
10+
@arg init - Configure the shell environment for basher
11+
EOF

examples/bats.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
3+
# https://github.com/bats-core/bats-core
4+
5+
source ./bin/args-init
6+
7+
args.parse -- <<"EOF"
8+
@flag [count.c] - Count test cases without running any tests
9+
@flag [filter.f] {} - Only run tests that match the regular expression
10+
@flag [formatter.F] {pretty} - Swithc between formatters: pretty (default), tap (default w/o term), tap13, junit
11+
@flag [help.h] - Display this help message
12+
@flag [jobs.j] {1} - Number of parallel jobs (requires GNU parallel)
13+
@flag [no-tempdir-cleanup] - Serialize test file execution instead of running them in parallel (requires --jobs >1)
14+
@flag [no-parallelize-within-files] - Serialize test execution within files instead of running them in parallel (requires --jobs >1)
15+
@flag [output.o] {} - Directory to write report files
16+
@flag [pretty.p] - Shorthand for "--formatter pretty"
17+
@flag [recursive.r] - Include tests in subdirectories
18+
@flag [tap.t] - Shorthand for "--formatter tap"
19+
@flag [timing.T] - Add timing information to tests
20+
@flag [version.v] - Display the version number
21+
EOF
22+
23+
printf "%s" "$argsHelpText"

examples/bocker.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
# https://github.com/p8952/bocker
4+
5+
source ./bin/args-init
6+
7+
args.parse -- <<"EOF"
8+
@flag [.p] - Prune empty. Exclude fields with empty values.
9+
@flag [.l] - Leaf only. Only show leaf nodes, which stops data duplication.
10+
@flag [.b] - Brief. Combines 'Leaf only' and 'Prune empty' options.
11+
@flag [.n] - No-head. Do not show nodes that have no path (lines that start with []).
12+
@flag [.s] - Remove escaping of the solidus symbol (straight slash).
13+
@flag [.h] - This help text.
14+
EOF
15+
16+
printf "%s" "$argsHelpText"

0 commit comments

Comments
 (0)