You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`zvm` provides built-in shell completion scripts for both Zsh and Bash. This enhances the command-line experience by allowing tab-completion of subcommands, flags, etc.
51
+
52
+
### Zsh
53
+
54
+
1.**Generate** the Zsh completion script:
55
+
```bash
56
+
zvm completions zsh > _zvm
57
+
```
58
+
2.**Move**`_zvm` into a directory that Zsh checks for autoloaded completion scripts. For example:
59
+
```bash
60
+
mkdir -p ~/.zsh/completions
61
+
mv _zvm ~/.zsh/completions
62
+
```
63
+
3.**Add** this to your `~/.zshrc`:
64
+
```bash
65
+
fpath+=(~/.zsh/completions)
66
+
autoload -U compinit && compinit
67
+
```
68
+
4.**Reload** your shell:
69
+
```bash
70
+
source~/.zshrc
71
+
```
72
+
5.**Test**:
73
+
```bash
74
+
zvm <TAB>
75
+
```
76
+
You should see a list of subcommands like `ls`, `install`, `use`, etc.
77
+
78
+
### Bash
79
+
80
+
1.**Generate** the Bash completion script:
81
+
```bash
82
+
zvm completions bash > zvm.bash
83
+
```
84
+
2.**Source** it in your `~/.bashrc` (or `~/.bash_profile`):
0 commit comments