forked from mirrors/jj
completion: Update docs for new style with positional argument
This commit is contained in:
parent
866e862ab0
commit
fb10e3f296
4 changed files with 12 additions and 12 deletions
|
@ -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)]
|
||||
|
|
|
@ -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]`
|
||||
|
|
|
@ -156,7 +156,7 @@ $ jj config set --user user.email "martinvonz@google.com"
|
|||
## 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
|
||||
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue