Commit graph

442 commits

Author SHA1 Message Date
sudotac
cd82f8cc8e fix(complete): Avoid use of -v in bash completion
Because -v is not supported below bash 5.0.
2024-04-07 23:19:50 +09:00
renovate[bot]
9d14f394ba
chore(deps): update compatible (dev) (#5438)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-01 00:30:25 +00:00
Pi-Cla
3b35dba160 docs: Add mention of nushell to clap_complete README 2024-03-22 11:43:50 -06:00
renovate[bot]
a2aa644368
chore(deps): update compatible (dev) (#5381)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-01 00:16:52 +00:00
Ed Page
0c01b5558d chore: Release 2024-02-16 16:33:14 -06:00
Ed Page
08e0b5bde4 docs: Update changelog 2024-02-16 16:32:57 -06:00
Alexis (Poliorcetics) Bourget
e782775229 fix(complete): Handle newlines in command/arg descriptions
Found while trying to add Nushell completions to
[`jj`](https://github.com/martinvonz/jj).
2024-02-16 16:17:22 -06:00
Ed Page
fba7c8597b test(complete): Show newline issue 2024-02-16 16:16:36 -06:00
Ed Page
5f9cecb6bd chore: Update snapbox/trycmd 2024-02-14 16:44:57 -06:00
Ed Page
a751c5fe65 chore: Release 2024-02-08 10:34:06 -06:00
Ed Page
9ec6c942b8 chore: Release 2024-02-08 10:33:13 -06:00
Ed Page
0735119775 docs: Update changelog 2024-02-08 10:32:13 -06:00
Ed Page
ea77b98da3 test(complete): Make it order independent 2024-02-08 06:19:06 -06:00
Ed Page
708afa33ef chore: Release 2024-02-02 10:12:09 -06:00
Ed Page
ec74349838 docs: Update changelog 2024-02-02 10:12:02 -06:00
sudotac
1edffb8576 fix(complete): Prevent filenames splitting
Fix #5313
2024-02-02 23:31:03 +09:00
sudotac
fe16f24ed8 test(complete): Verify filename splitting 2024-02-02 23:31:03 +09:00
renovate[bot]
4788918e01
chore(deps): update compatible (dev) (#5333)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-01 01:26:55 +00:00
Ed Page
bd9583059b chore: Release 2024-01-22 09:46:21 -06:00
Ed Page
35a96b0824 docs: Update changelog 2024-01-22 09:46:07 -06:00
Ed Page
646134a9a9
Merge pull request #5240 from sudotac/improve-bash-completion-with-compopt
Improve bash completion with compopt
2024-01-22 09:44:11 -06:00
sudotac
13a79804c9 fix(complete): Suppress a useless space completion 2024-01-20 21:29:51 +09:00
sudotac
e25b1abddf feat(complete): Add DirPath support in bash 2024-01-20 21:29:50 +09:00
sudotac
3a222def22 fix(complete): Fix path completion in bash
Fix #5239
2024-01-20 21:29:06 +09:00
sudotac
62a5ace9f1 test(complete): Verify some variants of ValueHint 2024-01-20 21:28:52 +09:00
Ed Page
6a2b3bf4fa chore: Release 2024-01-19 10:47:00 -06:00
Ed Page
069c7a6245 docs: Update changelog 2024-01-19 10:46:46 -06:00
Sebastian Holmin
ba378e635c fix(complete): Use bin_name for subcommands
Bash completions for subcommands used package
name, which broke completions when the `bin_name`
was different.

Update the `custom_bin_name` test to reflect the
correct behavior.
2024-01-19 10:27:36 +01:00
Sebastian Holmin
6411995641 test(complete): Add custom bin name test 2024-01-19 10:26:26 +01:00
Ed Page
c742b8eb0c chore(complete): Update completest-pty 2024-01-15 14:42:42 -06:00
Ed Page
f524d84c1d chore: Release 2024-01-15 13:09:45 -06:00
Ed Page
944fb81cf5 docs: Update changelog 2024-01-15 13:09:24 -06:00
Ed Page
6fcba9821d fix(complete): Don't provide help output for user
We shouldn't be injecting help when being flattened.

Unsure why this made tests fail inconsistentkly between CI and local
2024-01-15 12:51:45 -06:00
Ed Page
419f231dad chore: Update completest 2024-01-15 12:21:42 -06:00
Ed Page
6e862f5617 chore: Update completest 2024-01-15 12:21:41 -06:00
Ed Page
48d28aa689 chore: Release 2024-01-02 15:00:09 -06:00
Ed Page
748ce18cc2 docs: Update changelog 2024-01-02 15:00:00 -06:00
Henry Hsieh
2b48858ba8 fix: Skip nosort option below bash 4.4 2024-01-02 21:14:20 +08:00
renovate[bot]
924b2524d0
chore(deps): update compatible (dev) (#5276)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-01 01:44:12 +00:00
Ed Page
29208083b0 test: Update snapshots 2023-12-27 12:09:15 -06:00
Ed Page
28763ebb6d chore: Release 2023-12-27 11:58:25 -06:00
Ed Page
ace7bb5b45 docs(complete): Update changelog 2023-12-27 11:58:12 -06:00
Ed Page
76beca4d4d docs(complete): Polish API reference for dynamic 2023-12-27 11:57:38 -06:00
Ed Page
3724b9e2e4 docs: Include more content on docs.rs 2023-12-27 11:30:42 -06:00
Ed Page
28425e484f style(docs): Resolve warnings 2023-11-07 13:44:41 -06:00
renovate[bot]
14fd853fb9
chore(deps): update compatible (dev) (#5192)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-01 01:03:46 +00:00
Ed Page
9bfa5a338c chore: Release 2023-10-24 13:25:07 -05:00
Ed Page
38b5a2f956 chore: Release 2023-10-24 11:45:21 -05:00
Ed Page
dcced5ae6a chore: Bump completest 2023-10-16 13:16:40 -05:00
Ed Page
dfebb54423 style: Make clippy happy 2023-10-12 08:32:59 -05:00
Ed Page
39f5e807af chore: Release 2023-09-28 14:36:28 -05:00
Ed Page
485b957c4b chore: Upgrade anstream 2023-09-28 14:13:54 -05:00
Ed Page
204552890d chore: Release 2023-09-25 16:31:57 -05:00
Ed Page
55d2230016 docs: Update changelog 2023-09-25 16:31:49 -05:00
Ed Page
017c258be1 fix(complete): Include positionals in subcommands
Fixes #5139
2023-09-25 16:15:02 -05:00
Ed Page
82c93ce024 test(complete): Verify dynamic subcommand positional completion 2023-09-25 16:10:42 -05:00
Ed Page
6eac61154b chore: Release 2023-09-07 08:58:13 -05:00
Ed Page
a2f8b1a0a8 docs: Update changelog 2023-09-07 08:58:02 -05:00
jporwal05
34291a2b46 fix: (fish-completion) Help for value enum
Resolves #5101

- The completion of value enums now displays accurate help text
- This fix encloses help text in single quotes
- Any text after tab is taken as help text
- Comma in help text is not escaped
- This is because the the help text is now treated as literal
- No variable expansion or command substitution in help text
2023-09-07 17:54:28 +05:30
jporwal05
ca06c321c5 test: (completion) enum value help
- Breaking for fish shell
- Matching the bad output to make the test pass
2023-09-07 17:19:43 +05:30
renovate[bot]
dc63cba772
chore(deps): update compatible (dev) (#5108)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-01 01:47:45 +00:00
Ed Page
4647a8a860 chore: Update dependencies 2023-08-28 11:12:59 -05:00
Ed Page
2e49645418 chore: Release 2023-08-24 11:08:02 -05:00
Ed Page
7224e5044e docs: Update changelog 2023-08-24 11:06:00 -05:00
Roland Fredenhagen
aa3f47c239
test(complete): Help for possible value 2023-08-07 14:02:57 +07:00
Roland Fredenhagen
65b9c2b37d
test(complete): Helper for asserting dynamic completions 2023-08-07 13:46:27 +07:00
Roland Fredenhagen
5b10a9d83c
test(complete): Test help escaping 2023-08-04 01:20:50 +07:00
Roland Fredenhagen
bdefebf663
feat(complete): Show help in dynamic completions 2023-08-04 01:20:47 +07:00
Roland Fredenhagen
b613548b03
refactor(complete): Stop using generate utils in dynamic 2023-08-03 16:51:01 +07:00
renovate[bot]
1afb100687
chore(deps): update rust crate completest to 0.0.17 2023-08-01 00:56:25 +00:00
Roland Fredenhagen
4f9cf6be20
feat(complete): Dynamic fish completions 2023-08-01 01:42:05 +07:00
Roland Fredenhagen
a59c175396 fix(complete): Return leading dash on short args 2023-07-28 14:52:05 -05:00
Ed Page
0669994bbc style: Make clippy happy 2023-07-28 14:51:57 -05:00
Roland Fredenhagen
edabdf72b5 fix(complete): Only return imidiate child subcommands 2023-07-28 14:51:56 -05:00
Ed Page
12e1877627 fix(complete): Fix bash dynamic completions 2023-07-28 14:10:22 -05:00
Ed Page
56afdabcc0 test(complete): Rename fixture to avoid ambiguity 2023-07-28 13:54:02 -05:00
Ed Page
dc953e95d0 test(complete): Register bash dynamic completions 2023-07-28 13:28:30 -05:00
Roland Fredenhagen
9a6208c795 test(complete): Allow E2E dynamic completion tests 2023-07-28 12:55:57 -05:00
Ed Page
dac33b686b test(complete): Only limit by command when needed 2023-07-28 12:52:44 -05:00
Ed Page
fa95531230 test(complete): Make room for alt completion styles 2023-07-28 12:48:36 -05:00
Ed Page
abdb1d513e refactor(test): Move nushell tests to completest 2023-07-26 21:06:11 -05:00
Ed Page
053c778e98
Merge pull request #5045 from ModProg/fish-dynamic-completions-v3
chore(ci): Verify dynamic completion support
2023-07-27 08:01:17 -05:00
Ed Page
71d6a3d3ca chore: Update completest 2023-07-26 20:48:02 -05:00
Roland Fredenhagen
ab1407f1ae
chore: Fix dynamic completion tests 2023-07-26 23:52:14 +07:00
Roland Fredenhagen
f16a1a76bc
chore: Clippy 2023-07-26 23:48:37 +07:00
Ed Page
f98ba908aa chore(complete): Update completest 2023-07-24 12:57:56 -05:00
Ed Page
0137a8be65 chore(complete): Update completest 2023-07-21 14:42:49 -05:00
Ed Page
51e37af365 test(complete): Add basic tests for all shells 2023-07-20 20:08:58 -05:00
Ed Page
34a7973e53 refactor(complete): Assert on home change 2023-07-20 20:06:28 -05:00
Ed Page
1d0fa2c6ce refactor(complete): Make test code reusable 2023-07-20 20:06:08 -05:00
Ed Page
28be38b3a7 refactor(complete): Split tests up
This makes them easier to read and and easier to manually invoke
2023-07-20 20:06:08 -05:00
Ed Page
5c362fe5b1 refactor(complete): Merge test binaries for better parallelism 2023-07-20 20:06:08 -05:00
Ed Page
010d7c5464 test(complete): First end-to-end test 2023-07-20 20:06:01 -05:00
Ed Page
35a9d8438e fix(complete): Prefer our own sort order
For testing, I'm seeing different sort orders for local and CI despite
using the same bash version...
2023-07-20 12:14:24 -05:00
Ed Page
00e9217183 feat(complete)!: Open to new shells for dynamic completions 2023-07-18 21:50:34 -05:00
Ed Page
830dd740ef feat(complete): Add dynamic-support shell enum 2023-07-18 21:19:54 -05:00
Ed Page
278ae3ec63 refactor(complete): Pull out completer 2023-07-18 21:14:48 -05:00
Ed Page
e3f1ad932b refactor(complete): Generalize dynamic CLI interface 2023-07-18 21:06:29 -05:00
Ed Page
8e9ded2f6a fix(complete)!: Pull out generic completion code 2023-07-18 20:42:46 -05:00
Ed Page
e8622c5391 refactor(complete): Split out bash dynamic code 2023-07-18 20:39:34 -05:00
Ed Page
4bbcf6088f refactor(complete): Split dynamic into a directory 2023-07-18 20:37:51 -05:00
Ed Page
1289534b19 chore: Release 2023-07-05 10:38:09 -05:00
Ed Page
8d7ce55f79 docs: Update changelog 2023-07-05 10:37:56 -05:00
RubixDev
7b5bc6640c
fix(complete): PS short options not case-sensitive
fixes #2145
2023-07-04 15:27:47 +08:00
Ed Page
50f0e6bffb chore: Release 2023-06-01 21:10:46 -05:00
renovate[bot]
534be345d8
chore(deps): update compatible (dev) 2023-06-01 00:38:25 +00:00
Ed Page
9c3dc187cb chore: Release 2023-05-19 11:55:42 -05:00
Ed Page
5047bb40bd chore: Release 2023-05-19 11:48:29 -05:00
Cosmic Horror
863dd90ca4 docs(complete): Demo generating all completions 2023-05-13 11:25:55 -06:00
Ed Page
36f79289ca chore: Release 2023-05-12 10:23:52 +02:00
Ed Page
9d0e4512fa docs: Update changelog 2023-05-12 10:23:40 +02:00
clubby789
b1b2231db2 fix: Don't emit catchall when we have subcommands 2023-05-10 19:44:02 +01:00
Ed Page
2d4644a870 chore: Release 2023-05-09 21:44:11 +02:00
Ed Page
ea38450643 docs: Update changelog 2023-05-09 21:43:28 +02:00
clubby789
2f97216156 fix: Respect ValueHint::Other in bash 2023-05-09 20:11:48 +01:00
Yuri Astrakhan
d0302c5556 chore: Inline simple non-mixed format args 2023-05-04 15:58:04 -04:00
Ed Page
47c3b6f580
Merge pull request #4884 from nyurik/impl-order
chore: Order trait impl same as trait
2023-05-03 21:14:22 -05:00
Ed Page
5fb1b25799
Merge pull request #4883 from nyurik/happy-clippy
chore: Make Clippy happy
2023-05-03 21:13:47 -05:00
Yuri Astrakhan
1dc6304fcf chore: Order trait impl same as trait 2023-05-03 22:01:16 -04:00
Yuri Astrakhan
ebbdce4820 chore: Make Clippy happy 2023-05-03 21:56:07 -04:00
Yuri Astrakhan
797c23c415 chore: Inline format args using clippy fix
This command cleaned up all the format args,
making code significantly shorter and more readable.

```
cargo clippy --workspace --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2023-05-03 21:49:11 -04:00
Yuri Astrakhan
47cbc5f247 chore: Deduplicate powershell code complete
Makes powershell code more concise
2023-05-03 21:02:30 -04:00
Ed Page
43591bc1ee chore: Release 2023-04-21 07:42:44 -05:00
Ed Page
9bda2ac8a0 docs: Update changelog 2023-04-21 07:42:33 -05:00
Huan-Cheng Chang
a379bae895 fix: Escape special characters properly for zsh
Signed-off-by: Huan-Cheng Chang <changhc84@gmail.com>
2023-04-20 21:52:36 +02:00
Ed Page
feddd124b0 style: Move away from banned fns 2023-03-30 02:18:00 -05:00
Ed Page
8fc65e28b6 chore: Release 2023-03-28 02:19:08 -05:00
Ed Page
2852653656 chore: Release 2023-03-27 19:41:39 -05:00
Ed Page
2bb4146374 chore: Release 2023-03-25 03:56:28 -05:00
Ed Page
ea4dada1e4 fix(lex): Allow reporting errors for non-UTF8 longs 2023-03-25 03:42:04 -05:00
Ed Page
6419a0d937 perf!(lex): Build faster by removing os_str_bytes
We are doing direct transmutes between `OsStr` and `[u8]`.
https://github.com/rust-lang/rust/pull/95290 would make this natively
supported but I got tired of waitin for it.

This only saves about 1/4s off of `cargo build`.

This took 2.9 KiB off of `cargo bloat --release --example git`
2023-03-25 01:59:24 -05:00
Ed Page
d9a641bcc8 docs: Consistently use console fence type 2023-03-24 21:33:49 -05:00
mochi33i
7c6cf81476 docs(clap_complete): The file name of the command in the clap_complete example documentation was not supported, so it has been updated 2023-03-27 23:24:50 +09:00
Ed Page
e78bba0ec5 chore: Release 2023-03-16 10:42:06 -05:00
Ed Page
dec82598b2 chore: Upgrade trycmd 2023-03-16 06:07:46 -05:00
Ed Page
6c0600a031 chore: Fully specify dependencies 2023-03-16 06:07:08 -05:00
renovate[bot]
8469554c17
chore(deps): update compatible (dev) (#4741)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-01 04:51:19 +00:00
Ed Page
84a9b53cee chore: Release 2023-02-27 04:20:28 -06:00
Ed Page
9fa48d5f92 docs: Update changelog 2023-02-27 04:20:07 -06:00
XiaoXiaoSN
0f3e729358 feat(complete): Support to run ZSH completion as a script 2023-02-27 23:23:50 +08:00
Ed Page
cdb33b6ad2 test(complete): Adjust bash snapshot 2023-02-24 07:40:24 -06:00
Ed Page
2deb372195 chore: Release 2023-02-23 11:56:20 -06:00
Ed Page
c064da01c9 docs: Update changelog 2023-02-23 11:56:12 -06:00
Ed Page
77803337f8
Merge pull request #4612 from davvid/zsh-multi-length-arguments
clap_complete: fix support for two multi-length arguments in zsh
2023-02-23 11:55:17 -06:00
Ed Page
953e2dcd34 docs: Remove remaining references to clap attribute 2023-02-18 18:42:07 -06:00
Ed Page
fb9435d026 chore: Release 2023-02-15 10:27:15 -06:00
Martin
704d0e7a4f chore: Make format!() calls more readable 2023-01-29 19:14:47 +00:00
Ed Page
90c042eeae chore: Release 2023-01-23 13:05:20 -06:00
Ed Page
4f638b5c75 docs: Update changelog 2023-01-23 13:05:15 -06:00
Fredrik Jansson
3426310d8e fix: Bash test cases 2023-01-23 19:20:09 +01:00