Open wleczny opened 2 years ago
It works for me locally (macOS too, but Intel one). Do you use oh-my-zsh? I'm using it, I'm wondering whether some of its setup (beyond the compinit
stuff you mentioned) is required…
Installing oh-my-zsh
did the work, thanks!
Ideally, we should ensure it works even without oh-my-zsh…
I have oh-my-zsh but completions still don't work.
$ scala-cli e
(eval):5: unmatched '
(eval):5: unmatched '
(eval):5: unmatched '
The problem seems to be with those escaped '
characters:
$ scala-cli complete zsh-v1 "1" "e"
local -a args306746944
args306746944=(
'export:The \'export\' sub-command is experimental.'
)
_describe command args306746944
$ eval "local -a args306746944
args306746944=(
'export:The \'export\' sub-command is experimental.'
)
_describe command args306746944"
zsh: unmatched '
$ eval "local -a args306746944
args306746944=(
'export:The export sub-command is experimental.'
)
_describe command args306746944"
_tags:comptags:36: can only be called from completion function
_tags:comptry:55: can only be called from completion function
_tags:comptags:60: can only be called from completion function
_tags:comptags:67: can only be called from completion function
I am using scalacli version 1.0.0-RC2.
I hacked the completions file into
#compdef _scala-cli scala-cli
function _scala-cli {
eval "$(scala-cli complete zsh-v1 $CURRENT $words[@] | sed 's|\\||g')"
}
Now completions seem to work, but I probably don't get the intended quotes in the output...
export -- The export sub-command is experimental.
EDIT: this hack seems to completely break completions on scala-cli -
or scala-cli --
.
Version(s)
0.1.9
Describe the bug
After
scala-cli install completions
I had this error message in terminal every time I run it:Adding these 2 lines at the beginning of
.zshrc
file solved the case:It would be nice to get information what should I do during scala-cli completions installation.
Moreover scala-cli completions don't work for me after all these steps. I am using macOS with M1 Pro.