Updated Troubleshooting (markdown)
parent
20c0add00f
commit
c5ee8e7fc0
1 changed files with 16 additions and 16 deletions
|
@ -1,35 +1,35 @@
|
|||
## Completion is not working
|
||||
|
||||
If you are using the `completion` module, there can be a conflict if other scripts are running `compinit` too. Follow
|
||||
these steps to check:
|
||||
If you are using the `completion` module, there can be a conflict if other scripts are running `compinit` too.
|
||||
|
||||
If you're getting a "warning: compinit being called again after completion module at ..." message in the terminal, then remove the `compinit` call from the mentioned file.
|
||||
|
||||
If you're getting a "warning: completion was already initialized before completion module." message in the terminal, then follow
|
||||
these steps to check further:
|
||||
|
||||
1. Run the following code in your terminal, which will add lines to your `~/.zshenv` file:
|
||||
```zsh
|
||||
>>! ~/.zshenv <<\END
|
||||
autoload -Uz +X compinit
|
||||
functions[_original_compinit]=${functions[compinit]}
|
||||
functions[compinit]=$'print -u2 \'warning: compinit being called at \'${funcfiletrace[1]}
|
||||
functions[compinit]=$'print -u2 \'compinit being called at \'${funcfiletrace[1]}
|
||||
'${functions[compinit]}
|
||||
END
|
||||
```
|
||||
|
||||
2. Restart your terminal.
|
||||
|
||||
3. If there's a warning message, you can either:
|
||||
* Remove the `compinit` call from the mentioned file:
|
||||
* If you can edit the mentioned file, remove or comment the lines similar to these:
|
||||
```
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
```
|
||||
* If the mentioned file is read-only, read it and look for specific instructions on how the `compinit` call should
|
||||
be disabled.
|
||||
* Or remove the `completion` module:
|
||||
1. Remove or comment the `zmodule completion` line from your `~/.zimrc` file.
|
||||
2. Run `zimfw build` in your command prompt.
|
||||
3. If there's a "compinit being called at ..." message in the terminal, and it mentions Zim's "modules/completion/init.zsh" file, then you're good. Otherwise, remove the `compinit` call from the mentioned file:
|
||||
* If you can edit the mentioned file, remove or comment the lines similar to these:
|
||||
```
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
```
|
||||
* If the mentioned file is read-only, read it and look for specific instructions on how the `compinit` call should
|
||||
be disabled.
|
||||
|
||||
4. Restart your terminal.
|
||||
|
||||
5. Repeat steps 3-4 if there's another warning message.
|
||||
5. If there's another "compinit being called at ..." message, then repeat steps 3-4 .
|
||||
|
||||
6. Remove the lines added to `~/.zshenv` by the first step.
|
||||
|
|
Loading…
Reference in a new issue