dundalek/closh

Auto-complete woes on macOS 10.12

seancorfield opened this issue · 1 comments

As noted in #170 macOS doesn't come with bash auto-completion installed and even after brew install bash-completion@2 which is claimed to fix that problem, the _completion_loader error remained for me.

So I installed fish. First attempt was via brew install fish but that won't run to completion on macOS 10.12 due to (I believe) outdated Xcode tools since it complains about an unknown argument during the compile/install process. Second attempt was to use the macOS installer directly from the Fish Shell website. Success.

Next problem was that the zsh completion was hanging. Running the script from source via zsh -x showed the following message appearing:

zsh compinit: insecure directories, run compaudit for list

It hangs because this warning is accompanied by a prompt to enter yes or no to continue...

There were conflicting suggestions online about fixing this but what eventually worked for me was:

sudo chmod -R 755 /usr/local/share/zsh

This allows zsh completion to run.

That matters because if you are trying to get auto-complete inside Clojure expressions in Rebel Readline, it doesn't even get a chance because the zsh completion was hanging. Workaround: press TAB, then CTRL-C, and then Rebel Readline gets its chance.

So, TL;DR:

The solution to #170 is probably to recommend installing fish (via the installer!) and also to check the permissions on /usr/local/share/zsh.

What would probably also be useful would be some sort of config that could tell closh to disable one or more of the shell completions.

I don't care much about this issue and since it has had no response in eighteen months, I'm closing this out.