Updated Troubleshooting (markdown)
parent
20780738e6
commit
20c0add00f
1 changed files with 16 additions and 10 deletions
|
@ -3,18 +3,20 @@
|
|||
If you are using the `completion` module, there can be a conflict if other scripts are running `compinit` too. Follow
|
||||
these steps to check:
|
||||
|
||||
1. Run the following code in your terminal:
|
||||
1. Run the following code in your terminal, which will add lines to your `~/.zshenv` file:
|
||||
```zsh
|
||||
setopt EXTENDED_GLOB
|
||||
for ZDOTFILE in /etc/(zsh/)#(z|.z)(shenv|profile|shrc|login)(N) ${ZDOTDIR:-${HOME}}/.z(shenv|profile|shrc|login)(N); do
|
||||
if grep -Eq '^[^#]*\bcompinit\b' ${ZDOTFILE}; then
|
||||
print -u2 -P "%F{yellow}! You seem to be already calling %Bcompinit%b in %B${ZDOTFILE}%b.%f"
|
||||
fi
|
||||
done
|
||||
>>! ~/.zshenv <<\END
|
||||
autoload -Uz +X compinit
|
||||
functions[_original_compinit]=${functions[compinit]}
|
||||
functions[compinit]=$'print -u2 \'warning: compinit being called at \'${funcfiletrace[1]}
|
||||
'${functions[compinit]}
|
||||
END
|
||||
```
|
||||
|
||||
2. If there's any output, you can either:
|
||||
* Remove the `compinit` call from each of the mentioned files:
|
||||
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
|
||||
|
@ -26,4 +28,8 @@ these steps to check:
|
|||
1. Remove or comment the `zmodule completion` line from your `~/.zimrc` file.
|
||||
2. Run `zimfw build` in your command prompt.
|
||||
|
||||
3. Restart your terminal.
|
||||
4. Restart your terminal.
|
||||
|
||||
5. Repeat steps 3-4 if there's another warning message.
|
||||
|
||||
6. Remove the lines added to `~/.zshenv` by the first step.
|
||||
|
|
Loading…
Reference in a new issue