Skip to content

Commit

Permalink
feat(compl): update completions
Browse files Browse the repository at this point in the history
  • Loading branch information
dbohdan committed Jan 17, 2025
1 parent a4560cd commit bcdd127
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ pipx install git+https://github.com/remarshal-project/remarshal
uv tool install https://github.com/remarshal-project/remarshal
```

## Shell completions

Remarshal provides shell-completion files for Bash and fish.
You can install them from the directory [`completions/`](completions/).

## Usage

```none
Expand Down
2 changes: 1 addition & 1 deletion completions/remarshal.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ _remarshal() {
input_formats=$formats
output_formats="$formats python"

opts='--help --version --from --if --input-format --input --indent --stringify --max-values --output --sort-keys --to --of --output-format --unwrap --verbose --width --wrap --yaml-style'
opts='--help --version --from --if --input-format --input --indent --stringify --max-values --multiline --output --sort-keys --to --of --output-format --unwrap --verbose --width --wrap --yaml-style'

case "${prev}" in
--from | --if | --input-format | -f)
Expand Down
1 change: 1 addition & 0 deletions completions/remarshal.fish
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ complete -c remarshal -s t -l to -l of -l output-format -x -a "cbor json msgpack
complete -c remarshal -l indent -x -d "JSON and YAML indentation"
complete -c remarshal -s k -l stringify -d "Turn special values into strings"
complete -c remarshal -l max-values -x -d "Maximum number of values in input data"
complete -c remarshal -l multiline -x -d "Minimum items for multiline TOML array"
complete -c remarshal -s s -l sort-keys -d "Sort JSON, Python, and TOML keys"
complete -c remarshal -l width -x -d "Python and YAML line width"
complete -c remarshal -l yaml-style -x -a '"\'" "\\"" "|" ">"' -d "YAML formatting style"
Expand Down

0 comments on commit bcdd127

Please sign in to comment.