From 7e8eee21f1868896915dcd8da5606354447bb8ef Mon Sep 17 00:00:00 2001 From: Danny Ben Shitrit Date: Mon, 3 Nov 2025 10:52:14 +0000 Subject: [PATCH 1/3] add command.catch_all.catch_help --- src/configuration/command.md | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/configuration/command.md b/src/configuration/command.md index 5d91691..ce84e15 100644 --- a/src/configuration/command.md +++ b/src/configuration/command.md @@ -223,12 +223,27 @@ flags. It can be set in one of three ways: -- Set to `true` to just enable it. -- Set to a string, to show this string in the usage help text. -- Set to a hash containing `label`, `help` and `required` keys, to show a - detailed help for it when running with `--help`. By default, `catch_all` - arguments are optional, but you can specify `required: true` to require at - least one argument. ++++ Boolean +```yaml +# Enable catch all +# Default: false +catch_all: true +``` ++++ String +```yaml +# Enable catch all and use this string in the usage text +catch_all: docker_params +``` ++++ Hash +```yaml +# Configure all aspects of this feature. +catch_all: + label: params # usage label + help: Docker parameters # help text + required: true # require at least one parameter + catch_help: true # also catch `--help/-h` as any other parameter +``` ++++ To access arguments captured by `catch_all` in your script, use the `$other_args` array (or call the `inspect_args` command to see them). From f51775b0b1fe43fc31f7542cc92770aed865d000 Mon Sep 17 00:00:00 2001 From: Danny Ben Shitrit Date: Mon, 10 Nov 2025 18:37:57 +0000 Subject: [PATCH 2/3] add Settings.extra_lib_dirs --- retype.yml | 2 +- src/usage/settings.md | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/retype.yml b/retype.yml index d1ccf64..30167e7 100644 --- a/retype.yml +++ b/retype.yml @@ -13,7 +13,7 @@ editor: branding: logo: assets/logo.svg logoDark: assets/logo-dark.svg - label: v1.3.3 + label: v1.3.4 meta: title: " - Bashly" diff --git a/src/usage/settings.md b/src/usage/settings.md index 9faa04d..d8df77d 100644 --- a/src/usage/settings.md +++ b/src/usage/settings.md @@ -98,6 +98,24 @@ lib_dir: lib Set the path to use for common library files, relative to `source_dir`. +### `extra_lib_dirs` + +```yaml +# default +extra_lib_dirs: ~ + +# examples +extra_lib_dirs: common +extra_lib_dirs: [common, ../org_lib] +extra_lib_dirs: "common, ../org_lib" +``` + +Set additional one or more paths to use for common library files, relative to +the working directory, or as absolute paths. This option can be provided as +an array, a string, or a comma delimited string. + +[!button variant="primary" icon="code-review" text="Multiple Lib Dirs Example"](https://github.com/bashly-framework/bashly/tree/master/examples/multiple-lib-dirs#readme) + ### `commands_dir` ```yaml From 721a8031049d3ebf41243e99374390e4ef27974c Mon Sep 17 00:00:00 2001 From: Danny Ben Shitrit Date: Mon, 10 Nov 2025 18:38:49 +0000 Subject: [PATCH 3/3] update examples readme --- Gemfile.lock | 33 +++++++++++++++++++-------------- src/examples.md | 1 + 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9796998..85d3dd5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,7 +4,7 @@ GEM addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) base64 (0.3.0) - clamp (1.3.2) + clamp (1.3.3) colsole (1.0.0) docopt_ng (0.7.1) domain_name (0.6.20240107) @@ -17,20 +17,22 @@ GEM filewatcher-cli (1.1.0) clamp (~> 1.3) filewatcher (~> 2.1) - foreman (0.88.1) + foreman (0.90.0) + thor (~> 1.4) http (5.3.1) addressable (~> 2.8) http-cookie (~> 1.0) http-form_data (~> 2.2) llhttp-ffi (~> 0.5.0) - http-cookie (1.0.8) + http-cookie (1.1.0) domain_name (~> 0.5) http-form_data (2.3.0) - httpme (0.2.2) + httpme (0.2.3) colsole (>= 0.8.1, < 2) mister_bin (~> 0.7) puma (>= 5.6, < 7.0) rack-contrib (~> 2.3) + rackup (~> 2.2) sinatra (>= 3.0, < 5) llhttp-ffi (0.5.1) ffi-compiler (~> 1.0) @@ -40,32 +42,34 @@ GEM colsole (>= 0.8.1, < 2) docopt_ng (~> 0.7, >= 0.7.1) module_methods (0.1.0) - mustermann (3.0.3) + mustermann (3.0.4) ruby2_keywords (~> 0.0.1) - nio4r (2.7.4) - nokogiri (1.18.8-x86_64-linux-gnu) + nio4r (2.7.5) + nokogiri (1.18.10-x86_64-linux-gnu) racc (~> 1.4) public_suffix (6.0.2) - puma (6.6.0) + puma (6.6.1) nio4r (~> 2.0) racc (1.8.1) - rack (3.1.16) + rack (3.2.4) rack-contrib (2.5.0) rack (< 4) - rack-protection (4.1.1) + rack-protection (4.2.1) base64 (>= 0.1.0) logger (>= 1.6.0) rack (>= 3.0.0, < 4) rack-session (2.1.1) base64 (>= 0.1.0) rack (>= 3.0.0) - rake (13.3.0) + rackup (2.2.1) + rack (>= 3) + rake (13.3.1) ruby2_keywords (0.0.5) - sinatra (4.1.1) + sinatra (4.2.1) logger (>= 1.6.0) mustermann (~> 3.0) rack (>= 3.0.0, < 4) - rack-protection (= 4.1.1) + rack-protection (= 4.2.1) rack-session (>= 2.0.0, < 3) tilt (~> 2.0) sla (0.3.7) @@ -73,7 +77,8 @@ GEM mister_bin (~> 0.7) nokogiri (~> 1.10) webcache (~> 0.8) - tilt (2.6.0) + thor (1.4.0) + tilt (2.6.1) webcache (0.9.0) http (~> 5.0) diff --git a/src/examples.md b/src/examples.md index de9c0d3..094a828 100644 --- a/src/examples.md +++ b/src/examples.md @@ -69,6 +69,7 @@ All examples are listed below for convenience. - [command-paths](https://github.com/bashly-framework/bashly/tree/master/examples/command-paths#readme) - configuring nested paths for your source scripts - [command-function](https://github.com/bashly-framework/bashly/tree/master/examples/command-function#readme) - configuring custom internal function names - [split-config](https://github.com/bashly-framework/bashly/tree/master/examples/split-config#readme) - splitting your `bashly.yml` into several smaller files +- [multiple-lib-dirs](https://github.com/bashly-framework/bashly/tree/master/examples/multiple-lib-dirs#readme) - loading libraries from multiple locations ## Bashly library features