Skip to content

Commit

Permalink
completion: Update docs for new style with positional argument
Browse files Browse the repository at this point in the history
  • Loading branch information
poliorcetics committed Feb 17, 2024
1 parent 866e862 commit fb10e3f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions cli/src/commands/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ pub(crate) enum UtilCommand {
Apply it by running one of these:
- **bash**: `source <(jj util completion)`
- **fish**: `jj util completion --fish | source`
- **bash**: `source <(jj util completion bash)`
- **fish**: `jj util completion fish | source`
- **zsh**:
```shell
autoload -U compinit
compinit
source <(jj util completion --zsh)
source <(jj util completion zsh)
```
"#]
#[derive(clap::Args, Clone, Debug)]
Expand Down
6 changes: 3 additions & 3 deletions cli/tests/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -1740,13 +1740,13 @@ Print a command-line-completion script
Apply it by running one of these:
- **bash**: `source <(jj util completion)`
- **fish**: `jj util completion --fish | source`
- **bash**: `source <(jj util completion bash)`
- **fish**: `jj util completion fish | source`
- **zsh**:
```shell
autoload -U compinit
compinit
source <(jj util completion --zsh)
source <(jj util completion zsh)
```
**Usage:** `jj util completion [SHELL]`
Expand Down
6 changes: 3 additions & 3 deletions docs/install-and-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ $ jj config set --user user.email "[email protected]"
## Command-line completion

To set up command-line completion, source the output of
`jj util completion --bash/--zsh/--fish`. Exactly how to source it
`jj util completion bash/zsh/fish`. Exactly how to source it
depends on your shell.

### Bash
Expand All @@ -170,13 +170,13 @@ source <(jj util completion) # --bash is the default
```shell
autoload -U compinit
compinit
source <(jj util completion --zsh)
source <(jj util completion zsh)
```

### Fish

```shell
jj util completion --fish | source
jj util completion fish | source
```

### Xonsh
Expand Down
6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@
installManPage ./jj.1
installShellCompletion --cmd jj \
--bash <($out/bin/jj util completion --bash) \
--fish <($out/bin/jj util completion --fish) \
--zsh <($out/bin/jj util completion --zsh)
--bash <($out/bin/jj util completion bash) \
--fish <($out/bin/jj util completion fish) \
--zsh <($out/bin/jj util completion zsh)
'';
};
default = self.packages.${system}.jujutsu;
Expand Down

0 comments on commit fb10e3f

Please sign in to comment.