Skip to content

Commit

Permalink
doc: added changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Oct 12, 2023
1 parent 4eaae1e commit 0bdfceb
Show file tree
Hide file tree
Showing 13 changed files with 931 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ additional-js = ["asciinema/asciinema-player.min.js", "asciinema/load.js"]
git-repository-url = "https://github.com/rsteube/carapace-bin"
edit-url-template = "https://github.com/rsteube/carapace-bin/edit/master/docs/{path}"

[output.html.fold]
enable = true

[output.linkcheck]
follow-web-links = true
exclude = [ 'archlinux\.org' ]
4 changes: 4 additions & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@
- [carapace-lint](./development/tools/carapace-lint.md)
- [carapace-parse](./development/tools/carapace-parse.md)
- [carapace-generate](./development/tools/carapace-generate.md)
- [Changelog](./changelog.md)
- [v0.28](./changelog/v0.28.md)
- [v0.27](./changelog/v0.27.md)
- [v0.26](./changelog/v0.26.md)
3 changes: 3 additions & 0 deletions docs/src/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changelog

Noteworthy changes in releases.
29 changes: 29 additions & 0 deletions docs/src/changelog/v0.26.md
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
Binary file added docs/src/changelog/v0.26/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
276 changes: 276 additions & 0 deletions docs/src/changelog/v0.26/lexer.cast

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions docs/src/changelog/v0.27.md
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
Binary file added docs/src/changelog/v0.27/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions docs/src/changelog/v0.28.md
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
Binary file added docs/src/changelog/v0.28/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 75 additions & 0 deletions docs/src/changelog/v0.28/variable-condition.cast

Large diffs are not rendered by default.

161 changes: 161 additions & 0 deletions docs/src/changelog/v0.28/variable-custom.cast

Large diffs are not rendered by default.

Loading

0 comments on commit 0bdfceb

Please sign in to comment.