cli
cli copied to clipboard
After adding autocomplete I started getting compaudit on zsh
Do you want to request a feature or report a bug?
Bug but definitely arguable to be a feature
What is the current behavior?
All I did was added the below to my ~/.zshrc
# # heroku autocomplete setup
HEROKU_AC_ZSH_SETUP_PATH=/Users/path/to/heroku/autocomplete/zsh_setup && test -f $HEROKU_AC_ZSH_SETUP_PATH && source $HEROKU_AC_ZSH_SETUP_PATH;
I have the latest!
$ heroku update
heroku: Updating CLI... already on latest version: 7.38.1
Updating completions... done
setting DEBUG=*
does not have any effect.
This started to prompt for ignoring insecure directories.
zsh compinit: insecure directories and files, run compaudit for list.
Ignore insecure directories and files and continue [y] or abort compinit [n]?
As per my Oh my ZSH setup I have already got ZSH_DISABLE_COMPFIX="true"
. Should this value not be used to ignore and not wanting us to prompt for the next step?
This is annoying because I had to always respond to a prompt every time I open the terminal.
What is the expected behavior?
Based on the flag set for ZSH_DISABLE_COMPFIX
we need the prompting disabled.
Workarounds:
- Commented the lines on that had
compinit
on/Users/vprasanna/Library/Caches/heroku/autocomplete/zsh_setup
- Use the Oh my ZSH
heroku
plugin.
Anyone here? Is it even a repo that is monitored?
I just experienced this issue and found that it was because there were duplicate PATH setups in my .zshrc
I'm experiencing something similar (on macOS Big Sur). My terminal was hanging on launch, and after pressing ctrl-C I would discover that the following lines would be added several times to the end of my .zshrc file:
# heroku autocomplete setup
HEROKU_AC_ZSH_SETUP_PATH=/Users/cmf/Library/Caches/heroku/autocomplete/zsh_setup && test -f $HEROKU_AC_ZSH_SETUP_PATH && source $HEROKU_AC_ZSH_SETUP_PATH;
I tried deleting them, and they would re-appear after the next terminal launch.
I ran
$ brew install bash-completion@2
and then ran
$ heroku update
The next time I tried to open the terminal, it gave me the warning message
zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]?
It doesn't seem to make any difference whether I press [y] or [n]. If I press [y] it just repeats the same error message, and if I press [n] it says initialization aborted
and then it repeats the error message. Each time it adds the 'heroku autocomplete setup' message to the end of my .zshrc file, once for each button press. I have to press ctrl-C to be able to reach the terminal prompt.
I tried commenting the compinit
lines in /Users/cmf/Library/Caches/heroku/autocomplete/zsh_setup
, as suggested by @reflexdemon, but it didn't change anything.
ETA: I have ZSH_DISABLE_COMPFIX="true"
at the top of my .zshrc file, but the error seems to be triggered even before the .zshrc file is read. If I press ctrl-C at the first appearance of the error message, zsh doesn't even launch.
Edit-Again-To-Add: Edited the permissions that compinit was complaining about, and found and commented out this line that I found in my .zshrc:
printf "$(heroku autocomplete:script zsh)" >> ~/.zshrc; source ~/.zshrc
Set ZSH_DISABLE_COMPFIX
back to "false"
, and moved
# heroku autocomplete setup
HEROKU_AC_ZSH_SETUP_PATH=/Users/cmf/Library/Caches/heroku/autocomplete/zsh_setup && test -f $HEROKU_AC_ZSH_SETUP_PATH && source $HEROKU_AC_ZSH_SETUP_PATH;
farther up my .zshrc, as suggested here. Seems to have solved the problem!