-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
931 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Changelog | ||
|
||
Noteworthy changes in releases. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# v0.26 - Overly Attached Argument | ||
|
||
![](./v0.26/banner.png) | ||
|
||
## Argument | ||
|
||
Added support for various attached versions of passing non-optional flag arguments: | ||
|
||
```sh | ||
--longhand=arg | ||
-l=arg | ||
-larg | ||
-abclarg | ||
``` | ||
|
||
## Lexer | ||
|
||
Added a simple [lexer] for complex commands passed as single argument: | ||
|
||
![](./v0.26/lexer.cast) | ||
|
||
## Nushell | ||
|
||
Used the [lexer] to patch arguments as these are currently passed mostly [unprocessed] to the completion function. | ||
This is a workaround and has some edge cases but should overall improve the [Nushell] integration. | ||
|
||
[Nushell]:http://www.nushell.sh/ | ||
[lexer]:https://pkg.go.dev/github.com/google/shlex | ||
[unprocessed]:https://github.com/nushell/nushell/issues/9883 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# v0.27 - Hulk BASH! | ||
|
||
![](./v0.27/banner.png) | ||
|
||
Contains strong changes to the [bash] integration. | ||
|
||
## Redirects | ||
|
||
Support for redirects. [bash] passes these to the completion function, so crazy stuff like this is possible: | ||
|
||
```sh | ||
example action >/tmp/stdout.txt embeddedPositional1 --styles 2>/tmp/stderr.txt red 'embeddedPositional2 with space' | ||
``` | ||
|
||
To make this work [carapace-shlex] is now used to parse `COMP_LINE` when invoked from a [bash] completion function. | ||
|
||
## Wordbreaks | ||
|
||
Better support for [bash] [`COMP_WORDBREAKS`] using [carapace-shlex]. | ||
This was originally intended to make multipart completion easier (e.g. colon separated list), | ||
but actually makes it very complicated and error-prone. | ||
|
||
## Case insensitive matching | ||
|
||
Added (limited) case insensitive [matching]. | ||
|
||
Set environment variable `CARAPACE_MATCH` to `CASE_INSENSITIVE` or `1` to activate it. | ||
You might also need to configure your shell, e.g. in elvish: | ||
|
||
```elvish | ||
set-env CARAPACE_MATCH CASE_INSENSITIVE | ||
set edit:completion:matcher[argument] = {|seed| edit:match-prefix $seed &ignore-case=$true } | ||
``` | ||
|
||
[bash]:https://www.gnu.org/software/bash/ | ||
[carapace-shlex]:https://github.com/rsteube/carapace-shlex | ||
[`COMP_WORDBREAKS`]:https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html | ||
[matching]:https://github.com/rsteube/carapace/blob/master/pkg/match/match.go |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# v0.28 - Greenwashing | ||
|
||
![](./v0.28/banner.png) | ||
|
||
This one is messing with your environment. | ||
|
||
## Variable | ||
|
||
> This feature still needs some finishing touches. | ||
Complex environment variable completion is provided with `get-env`, `set-env` and `unset-env`. | ||
|
||
In `elvish` the completion is simply overridden. | ||
For other shells custom functions are added. | ||
|
||
> Setting `CARAPACE_ENV=0` before sourcing `carapace _carapace` disables this behaviour. | ||
![](./v0.28/variable.cast) | ||
|
||
### Custom variables | ||
|
||
Custom variables can be defined in `~/.config/carapace/variables/{group}.yaml` | ||
|
||
```yaml | ||
variables: | ||
CUSTOM_EXAMPLE: example environment variable | ||
CUSTOM_MACRO: macro example | ||
HTTPS_PROXY: override existing variable | ||
completion: | ||
variable: | ||
CUSTOM_EXAMPLE: ["0\tdisabled\tred", "1\tenabled\tgreen"] | ||
CUSTOM_MACRO: ["$_tools.gh.Labels({owner: rsteube, name: carapace}) ||| $uniquelist(,)"] | ||
HTTPS_PROXY: ["https://localhost:8443\tdevelopment", "https://proxy.company:443\tproduction"] | ||
``` | ||
![](./v0.28/variable-custom.cast) | ||
It is also possible to define conditions. | ||
```yaml | ||
condition: ["$Parent([.git])"] | ||
variables: | ||
CUSTOM_CONDITION: condition example | ||
completion: | ||
variable: | ||
CUSTOM_CONDITION: ["within", "git", "repo"] | ||
``` | ||
![](./v0.28/variable-condition.cast) | ||
## Specific modifiers | ||
> TODO | ||
## Git | ||
Full support for [relative refs](https://blog.git-init.com/relative-vs-absolute-references-in-git/) | ||
> TODO |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.