Skip to content

Commit

Permalink
Add documentation about shell auto-completioin
Browse files Browse the repository at this point in the history
  • Loading branch information
MTBorg committed Sep 1, 2024
1 parent 0bb66ba commit ab4a541
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,28 @@ name to ignore. For example:
```shell
export REDWOOD_IGNORED_DIRS="node_modules,target,.git,.cargo,.rustup,go"
```

## Shell auto-completion

### Zsh

```shell
make install-zsh-completions
```

### Fish

Copy this to your fish config file:

```fish
# Redwood completions
set -l rw_commands delete help list new open version
complete -c redwood --no-files -n "not __fish_seen_subcommand_from $rw_commands"\
-a 'delete help list new open version'
complete -c redwood -n "__fish_seen_subcommand_from open" \
-a "(redwood list)"
complete -c redwood -n "__fish_seen_subcommand_from delete" \
-a "(redwood list --only-worktrees)"
complete -c redwood -n "__fish_seen_subcommand_from new" \
-a "(redwood list --only-bare-repos)"
```

0 comments on commit ab4a541

Please sign in to comment.