Crates.io | nu-plugin-bexpand |
lib.rs | nu-plugin-bexpand |
version | |
source | src |
created_at | 2023-06-24 23:10:33.608146 |
updated_at | 2024-12-23 05:29:09.982193 |
description | A brace expansion plugin compatible with Bash for nushell |
homepage | |
repository | https://forge.axfive.net/Taylor/nu-plugin-bexpand |
max_upload_size | |
id | 899176 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Bash-style brace expansion in nushell.
The format specification and functionality is fully explained in the bexpand crate, which implements the parser and iterator types independent of nushell.
> cargo install nu-plugin-bexpand
...
> register ~/.cargo/bin/nu_plugin_bexpand
> help str bexpand
Bash-style brace expansion
Usage:
> str bexpand
Flags:
-h, --help - Display the help message for this command
Signatures:
<string> | str bexpand -> list<string>
list<string> | str bexpand -> list<string>
Examples:
Get a list of standard nushell config items
> '~/config/nushell/{env,config,plugin}.nu' | str bexpand
> 'a{b,c,d{๐ฅฐ..๐ฅด..2}e}f' | str bexpand
โญโโโโฌโโโโโโโโโฎ
โ 0 โ abf โ
โ 1 โ acf โ
โ 2 โ ad๐ฅฐef โ
โ 3 โ ad๐ฅฒef โ
โ 4 โ ad๐ฅดef โ
โฐโโโโดโโโโโโโโโฏ
> 'a{1..3}c{4..6..2}b' | str bexpand
โญโโโโฌโโโโโโโโฎ
โ 0 โ a1c4b โ
โ 1 โ a1c6b โ
โ 2 โ a2c4b โ
โ 3 โ a2c6b โ
โ 4 โ a3c4b โ
โ 5 โ a3c6b โ
โฐโโโโดโโโโโโโโฏ
> [a{๐ค..๐ค}b c{๐ง..๐ฆ..31}d e{15..-23..8}f] | str bexpand
โญโโโโโฌโโโโโโโโฎ
โ 0 โ a๐คb โ
โ 1 โ a๐คb โ
โ 2 โ a๐คb โ
โ 3 โ c๐งd โ
โ 4 โ c๐ฆผd โ
โ 5 โ c๐ฆd โ
โ 6 โ e15f โ
โ 7 โ e7f โ
โ 8 โ e-1f โ
โ 9 โ e-9f โ
โ 10 โ e-17f โ
โฐโโโโโดโโโโโโโโฏ
> '{0..๐งฟ..129300}' | str bexpand
โญโโโโฌโโโโโฎ
โ 0 โ 0 โ
โ 1 โ ๐ฅ โ
โฐโโโโดโโโโโฏ
> ['success{a,b,c}test' 'fail{test'] | str bexpand
Error: ร Brace expression failed to parse
โญโ[entry #13:1:1]
1 โ ['success{a,b,c}test' 'fail{test'] | str bexpand
ยท โโโโโโฌโโโโโ
ยท โฐโโ 0: at line 1, in Eof:
fail{test
^
โฐโโโโ
> "{\u{D7FF}..\u{E000}}" | str bexpand
Error: ร Expression failed to generate
โญโ[entry #15:1:1]
1 โ "{\u{D7FF}..\u{E000}}" | str bexpand
ยท โโโโโโฌโโโโโ
ยท โฐโโ converted integer out of range for `char`
โฐโโโโ