After updating my RasPi3 today, I started getting this error every time a new session is started:
/tmp/zsh-1000/prezto-fasd-cache.1000.zsh:compctl:17: unknown condition code:
If I open that file, line 17 corresponds to:
compctl -U -K _fasd_zsh_cmd_complete -V fasd -x 'C[-1,-*e],s[-]n[1,e]' -c - \ 'c[-1,-A][-1,-D]' -f -- fasd fasd_cd
and if I run that command, I get: compctl: unknown condition code: error.
I updated prezto to the latest git version and the error persists.
I did notice that zsh was one of the packages that was updated so that's the most probable culprit (update from 5.4.2-2 -> 5.5-1). My desktop Linux install runs an older version of prezto and I don't get this error even though I do have 5.5 installed.
[2018-04-13 13:43] [PACMAN] Running 'pacman -Syu'
[2018-04-13 13:43] [PACMAN] synchronizing package lists
[2018-04-13 16:52] [PACMAN] starting full system upgrade
[2018-04-13 16:53] [ALPM] transaction started
[2018-04-13 16:53] [ALPM] upgraded pcre (8.41-1 -> 8.42-1)
[2018-04-13 16:53] [ALPM] upgraded libutil-linux (2.32-2 -> 2.32-3)
[2018-04-13 16:53] [ALPM] upgraded glib2 (2.56.0+7+g66948ae23-1 -> 2.56.1-1)
[2018-04-13 16:53] [ALPM] upgraded libgpg-error (1.28-1 -> 1.29-1)
[2018-04-13 16:53] [ALPM] upgraded libsystemd (238.51-1 -> 238.76-1.1)
[2018-04-13 16:53] [ALPM] upgraded avahi (0.7-4 -> 0.7+4+gd8d8c67-1)
[2018-04-13 16:53] [ALPM] upgraded firmware-raspberrypi (3-1 -> 4-1)
[2018-04-13 16:53] [ALPM] upgraded geoip-database (20180306-1 -> 20180403-1)
[2018-04-13 16:53] [ALPM] installed perl-timedate (2.30-4)
[2018-04-13 16:53] [ALPM] installed perl-mailtools (2.20-1)
[2018-04-13 16:54] [ALPM] upgraded git (2.16.3-1 -> 2.17.0-1)
[2018-04-13 16:54] [ALPM] upgraded sqlite (3.22.0-1 -> 3.23.1-1)
[2018-04-13 16:54] [ALPM] upgraded libsecret (0.18.5+14+g9980655-1 -> 0.18.6-1)
[2018-04-13 16:54] [ALPM] upgraded gnupg (2.2.5-1 -> 2.2.6-1)
[2018-04-13 16:54] [ALPM] upgraded htop (2.1.0-2 -> 2.2.0-2)
[2018-04-13 16:54] [ALPM] upgraded libusb (1.0.21-2 -> 1.0.22-1)
[2018-04-13 16:55] [ALPM] upgraded iproute2 (4.15.0-1 -> 4.16.0-1)
[2018-04-13 16:55] [ALPM] upgraded util-linux (2.32-2 -> 2.32-3)
[2018-04-13 16:55] [ALPM] upgraded systemd (238.51-1 -> 238.76-1.1)
[2018-04-13 16:55] [ALPM] upgraded libinput (1.10.3-1 -> 1.10.4-1)
[2018-04-13 16:55] [ALPM] upgraded mkinitcpio-busybox (1.28.1-1 -> 1.28.3-1)
[2018-04-13 16:55] [ALPM] upgraded linux-raspberrypi (4.14.31-1 -> 4.14.33-2)
[2018-04-13 16:55] [ALPM-SCRIPTLET] >>> Updating module dependencies. Please wait ...
[2018-04-13 16:56] [ALPM] upgraded logrotate (3.13.0-1 -> 3.14.0-1)
[2018-04-13 16:56] [ALPM] upgraded lsof (4.90-2 -> 4.91-1)
[2018-04-13 16:56] [ALPM] upgraded man-db (2.8.2-1 -> 2.8.3-1)
[2018-04-13 16:56] [ALPM] upgraded mesa (17.3.7-1 -> 18.0.0-3)
[2018-04-13 16:56] [ALPM] upgraded openssl-1.0 (1.0.2.n-1 -> 1.0.2.o-1)
[2018-04-13 16:56] [ALPM] upgraded procps-ng (3.3.12-3 -> 3.3.13-1)
[2018-04-13 16:56] [ALPM] upgraded raspberrypi-bootloader (20180326-1 -> 20180409-1)
[2018-04-13 16:56] [ALPM] upgraded raspberrypi-bootloader-x (20180326-1 -> 20180409-1)
[2018-04-13 16:57] [ALPM] upgraded sed (4.4-1 -> 4.5-1)
[2018-04-13 16:57] [ALPM] upgraded systemd-sysvcompat (238.51-1 -> 238.76-1.1)
[2018-04-13 16:57] [ALPM] upgraded youtube-dl (2018.03.26.1-1 -> 2018.04.09-1)
[2018-04-13 16:57] [ALPM] upgraded zsh (5.4.2-2 -> 5.5-1)
[2018-04-13 16:57] [ALPM] transaction completed
I've attempted commenting out fasd in .zpreztorc but then I get errors in syntax-highlighting which is the next module to be loaded after fasd.
Is there anything I can do to resolve this? Thanks.
I recommend clearing out any cache files like that which error. With any luck it's a difference in caches between zsh versions and isn't a major bug.
@belak I've removed that file (and actually all of the files) from /tmp but it comes back. Are there any other cache files I can remove?
It may be related to this: https://github.com/clvv/fasd/issues/123
I'm not sure what to do about this since fasd hasn't been updated in almost 3 years and we're trying to eventually move support for these external modules out of the repo.
@belak Thank you! I think that's the same issue. I don't think anything's really broken so I'll just ignore that error for now. That line 17 always produces the same error message whether it's in a script or on the command line.
I have the same error after update zsh to 5.5 on OSX
Meh, sorry. Was hoping I'd just be able to remove spammy comments like +1 but it looks like it leaves around a remnant.
In any sense, you don't need to be commenting here - this is an upstream issue with the code we pull in from fasd. Your best bet would be to fix it there and then comment here about pulling in the fixes here.
Meh, so then excuse my comment - did not want to "spam" but just to mention that I'm affected, too.
And did that just because I did not recognize this thread here as spam, as I did not recognize this issue as upstream, as I happens for me after the zsh upgrade too (and not after maybe a fasd upgrade).
(and to be honest just overseen your upstream label)
So yes, it can be stopped from here on (maybe eval another tool like autojump or whatsoever - but also maybe not [since I'm totally unaware of any dependencies]).
Not a problem. I'm a little more sensitive to comments like that because I had to deal with a project where we'd get comment chains of tens of people commenting with nothing but +1... Which can quickly distract from comments with more useful debugging info. I'll leave them around from now on unless it really becomes a problem in these threads since it is useful to get an idea of how many people are running into an issue, but I usually view voting with the emoji to be a better alternative.
My current guess is that it's an incompatibility between fasd and the latest version of zsh. If anyone has the time to investigate further, I'd be happy to look at porting a fix into prezto.
It is a "bug" at zsh 5.5 and later. Older versions works properly. What happens here is that zsh evaluates the backslash + newline before the escaping backslash, creating the incorrect line. I tested with older versions, and with bash again, they are evaluating it correctly, properly escaping the backslash and printing 2 lines of text.
@giorni is there an upstream zsh bug ticket that can be tracked for this?
@jeffwidman there isn't. It is hosted at SourceForge, but they don't use bug tracking feature anymore since 2013, it is all on zsh mailing list. I have already submitted a patch that fix it, you can track it at http://www.zsh.org/mla/workers//2018/msg00504.html and on the follow up messages. They have already reviewed and "accepted" it, but I think it will take a while to go to an upstream version.
Dug around SourceForge, Giorni's fix is here. I suspect it will be released with the next 5.5 release (current is 5.5.1).
Oddly, building from master doesn't seem to do any good. Is there something else one needs to do in order to get that patch in?
@phyllisstein the problem happens when writing the cache. It incorrectly parses backslash generating a file that is "correctly" wrong. Have you deleted it and regenerated with your local zsh build?
I clobbered and regenerated .zcompdump, which was the only ZSH cache I know of offhand. Are there other caches I should purge? Sorry for the na茂ve question---I don't know much about ZSH's innards---but thanks for responding!
Nope, sorry, perhaps I missed that step the last time around. Just tried again and it worked fine. Thanks for the patch and the help! 馃挅
It looks like zsh 5.6 was just released. Can anyone confirm that this issue has been resolved?
brew update and brew upgrade zsh - after that, opened a new tab and error was gone.
I just upgraded two machines, both to zsh 5.6.1.
On one of them, the error has disappeared, on the other, it's still present, even after running rm -rf ~/.zcomp*
UPDATE: Oops, I forgot I'd only restarted one of the machines. When I restarted the second, it also started working correctly.
So I'm going to close this ticket since I'm pretty sure the root cause is fixed.
Most helpful comment
Dug around SourceForge, Giorni's fix is here. I suspect it will be released with the next 5.5 release (current is 5.5.1).