New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix _zsh_highlight_load_highlighters when executing zsh with sudo rights #518
Conversation
Cross-referencing #506. More below
I can't reproduce that. Please change -c to -fc and try again. What's the zsh version, distro, and
Thanks for the analysis. I'd still like to double-check whether it's really a bug in the |
macOS 10.13.4 (17E202) I changed parameter to |
Thanks. I'm on Linux, so I'll wait for an OS X -using dev to weigh in.
In the meantime, could you please confirm that `zsh --version` and `sudo zsh --version` are the same value?
… macOS 10.13.4 (17E202)
zsh 5.5.1 (x86_64-apple-darwin17.5.0)
I changed parameter to `-fc` still wrong result with sudp
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#518 (comment)
|
The zsh bug was reported as workers/42891 : http://www.zsh.org/cgi-bin/mla/redirect?WORKERNUMBER=42891
|
It was me :-D so i test with ubuntu and i can not reproduce it there, however i tried it on macos of my colleges and it seem like its not a problem only on my mashines |
|
Hey, would be great if you could except my pull request, cause I think it will take some time until zsh is fixed :-( |
I'd like to move to autoloading the highlighters in the future, but this patch is tiny as you point out, so I think it's reasonable to merge it. Could you rebase into a single commit and match the commit message style? (Something like |
done |
Thanks for the report and fix! |
I am facing following error message if i start my zsh with sudo right e.g.
sudo zsh
Error Log
_zsh-syntax-highlighting: 'README.md' highlighter should define both required functions '_zsh_highlight_highlighter_README.md_paint' and 'zsh_highlight_highlighter_README.md_predicate' in '/Users/USERNAME/.zsh.zgem/gems/zsh-syntax-highlighting/highlighters/README.md/README.md-highlighter.zsh'.
this is caused by a really strange behaviour of zsh itself.
ZSH Issue Example
If you create a file and folder
...,if you want to print only folders globing works as expected
..., however if you run the same command with sudo it will also print the file, as a folder.
thats totally weird.
Solution
Because thats a zsh issue I adjust the globing expression, now it works as expected.