-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
highlighting for sudo commands #107
Comments
SUDO_PATHを使う方式にしてみたが、sudoを sudo env PATH=hoge の エイリアスにしたところzsh-syntax-highlightingのハイライトが 意図した通りの挙動にならなかった。(詳しくは highlighting for sudo commands #107 zsh-users/zsh-syntax-highlighting#107 を参照のこと。) それに btrfs version とか--helpオプションのように、sbin系でも 一般ユーザが実行して成功して終了できる場合があるので、やっぱり sudo以外の場合でも実行できてほしい。 そんなわけで元に戻してsbin系もPATHに含めた。
I just checked this bug. It seems to have been fixed since it was reported. So let us close it. |
Can you describe the working setup? I can still reproduce it on debian with zsh-5.1 under (Reopening until we figure this out.) |
Sorry for the noise. /sbin was added my $path when I tried this earlier today. Thanks for reopening! |
In 0.4.1 commands from root's path are highlighted in red. During 0.5.0 development they were shown in default (like any not-otherwise-special word), but 757d047 (in 0.5.0-to-be) restores the behaviour of 0.4.1. |
Various ideas:
Or we could do something else entirely:
|
zsh can complete commands that are on root's path but not on user's path by adding the following to .zshrc
But these commands aren't being properly highlighted by zsh-syntax-highlighting. Instead of green (valid command) they are appearing red (invalid command). Is there a setting similar to environ to change this?
The text was updated successfully, but these errors were encountered: