Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 19 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -40,40 +42,43 @@ 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)
colsole (>= 0.8.1, < 2)
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)

Expand Down
2 changes: 1 addition & 1 deletion retype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
27 changes: 21 additions & 6 deletions src/configuration/command.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
1 change: 1 addition & 0 deletions src/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
18 changes: 18 additions & 0 deletions src/usage/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down