From c5ee8e7fc03992ccd00a28b60006ef9724632258 Mon Sep 17 00:00:00 2001 From: Eric Nielsen <4120606+ericbn@users.noreply.github.com> Date: Mon, 17 Jun 2024 17:29:42 -0500 Subject: [PATCH] Updated Troubleshooting (markdown) --- Troubleshooting.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Troubleshooting.md b/Troubleshooting.md index 868231e..6cbd7ef 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -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.