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:
|
Apply it by running one of these:
|
||||||
|
|
||||||
- **bash**: `source <(jj util completion)`
|
- **bash**: `source <(jj util completion bash)`
|
||||||
- **fish**: `jj util completion --fish | source`
|
- **fish**: `jj util completion fish | source`
|
||||||
- **zsh**:
|
- **zsh**:
|
||||||
```shell
|
```shell
|
||||||
autoload -U compinit
|
autoload -U compinit
|
||||||
compinit
|
compinit
|
||||||
source <(jj util completion --zsh)
|
source <(jj util completion zsh)
|
||||||
```
|
```
|
||||||
"#]
|
"#]
|
||||||
#[derive(clap::Args, Clone, Debug)]
|
#[derive(clap::Args, Clone, Debug)]
|
||||||
|
|
|
@ -1740,13 +1740,13 @@ Print a command-line-completion script
|
||||||
|
|
||||||
Apply it by running one of these:
|
Apply it by running one of these:
|
||||||
|
|
||||||
- **bash**: `source <(jj util completion)`
|
- **bash**: `source <(jj util completion bash)`
|
||||||
- **fish**: `jj util completion --fish | source`
|
- **fish**: `jj util completion fish | source`
|
||||||
- **zsh**:
|
- **zsh**:
|
||||||
```shell
|
```shell
|
||||||
autoload -U compinit
|
autoload -U compinit
|
||||||
compinit
|
compinit
|
||||||
source <(jj util completion --zsh)
|
source <(jj util completion zsh)
|
||||||
```
|
```
|
||||||
|
|
||||||
**Usage:** `jj util completion [SHELL]`
|
**Usage:** `jj util completion [SHELL]`
|
||||||
|
|
|
@ -156,7 +156,7 @@ $ jj config set --user user.email "martinvonz@google.com"
|
||||||
## Command-line completion
|
## Command-line completion
|
||||||
|
|
||||||
To set up command-line completion, source the output of
|
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.
|
depends on your shell.
|
||||||
|
|
||||||
### Bash
|
### Bash
|
||||||
|
@ -170,13 +170,13 @@ source <(jj util completion) # --bash is the default
|
||||||
```shell
|
```shell
|
||||||
autoload -U compinit
|
autoload -U compinit
|
||||||
compinit
|
compinit
|
||||||
source <(jj util completion --zsh)
|
source <(jj util completion zsh)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Fish
|
### Fish
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
jj util completion --fish | source
|
jj util completion fish | source
|
||||||
```
|
```
|
||||||
|
|
||||||
### Xonsh
|
### Xonsh
|
||||||
|
|
|
@ -99,9 +99,9 @@
|
||||||
installManPage ./jj.1
|
installManPage ./jj.1
|
||||||
|
|
||||||
installShellCompletion --cmd jj \
|
installShellCompletion --cmd jj \
|
||||||
--bash <($out/bin/jj util completion --bash) \
|
--bash <($out/bin/jj util completion bash) \
|
||||||
--fish <($out/bin/jj util completion --fish) \
|
--fish <($out/bin/jj util completion fish) \
|
||||||
--zsh <($out/bin/jj util completion --zsh)
|
--zsh <($out/bin/jj util completion zsh)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
default = self.packages.${system}.jujutsu;
|
default = self.packages.${system}.jujutsu;
|
||||||
|
|
Loading…
Reference in a new issue