mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 04:51:22 +00:00
Revert "docs(cli): Fix documentation about usage of deno completions … (#8468)
This reverts commit 17d4cd9213
.
This commit is contained in:
parent
fec7fdc691
commit
230a11e8a4
18
cli/flags.rs
18
cli/flags.rs
@ -819,22 +819,8 @@ fn completions_subcommand<'a, 'b>() -> App<'a, 'b> {
|
|||||||
.about("Generate shell completions")
|
.about("Generate shell completions")
|
||||||
.long_about(
|
.long_about(
|
||||||
"Output shell completion script to standard output.
|
"Output shell completion script to standard output.
|
||||||
|
deno completions bash > /usr/local/etc/bash_completion.d/deno.bash
|
||||||
bash:
|
source /usr/local/etc/bash_completion.d/deno.bash",
|
||||||
deno completions bash | sudo tee /etc/bash_completion.d/deno.bash > /dev/null
|
|
||||||
source /etc/bash_completion.d/deno.bash
|
|
||||||
|
|
||||||
zsh:
|
|
||||||
deno completions zsh |sudo tee /usr/local/share/zsh/site-functions/_deno
|
|
||||||
|
|
||||||
Make sure to run compinit after the above command
|
|
||||||
|
|
||||||
fish:
|
|
||||||
deno completions fish > ~/.config/fish/completions/deno.fish
|
|
||||||
|
|
||||||
powershell:
|
|
||||||
deno completions powershell > $profile
|
|
||||||
.$profile",
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,22 +32,40 @@ The supported shells are:
|
|||||||
Example (bash):
|
Example (bash):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
deno completions bash | sudo tee /etc/bash_completion.d/deno.bash > /dev/null
|
deno completions bash > /usr/local/etc/bash_completion.d/deno.bash
|
||||||
source /etc/bash_completion.d/deno.bash
|
source /usr/local/etc/bash_completion.d/deno.bash
|
||||||
```
|
```
|
||||||
|
|
||||||
Example (zsh):
|
Example (zsh without framework):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
deno completions zsh | sudo tee /usr/local/share/zsh/site-functions/_deno
|
mkdir ~/.zsh # create a folder to save your completions. it can be anywhere
|
||||||
|
deno completions zsh > ~/.zsh/_deno
|
||||||
```
|
```
|
||||||
|
|
||||||
Example (fish):
|
then add this to your `.zshrc`
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
deno completions fish > ~/.config/fish/completions/deno.fish
|
fpath=(~/.zsh $fpath)
|
||||||
|
autoload -Uz compinit
|
||||||
|
compinit -u
|
||||||
```
|
```
|
||||||
|
|
||||||
|
and restart your terminal. note that if completions are still not loading, you
|
||||||
|
may need to run `rm ~/.zcompdump/` to remove previously generated completions
|
||||||
|
and then `compinit` to generate them again.
|
||||||
|
|
||||||
|
Example (zsh + oh-my-zsh) [recommended for zsh users] :
|
||||||
|
|
||||||
|
```shell
|
||||||
|
mkdir ~/.oh-my-zsh/custom/plugins/deno
|
||||||
|
deno completions zsh > ~/.oh-my-zsh/custom/plugins/deno/_deno
|
||||||
|
```
|
||||||
|
|
||||||
|
After this add deno plugin under plugins tag in `~/.zshrc` file. for tools like
|
||||||
|
`antigen` path will be `~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins` and
|
||||||
|
command will be `antigen bundle deno` and so on.
|
||||||
|
|
||||||
Example (Powershell):
|
Example (Powershell):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
Loading…
Reference in New Issue
Block a user