-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
sudo state detection is working incorrectly #604
Comments
Which description? |
Sorry I meant the description from the powerlevel9k segment.
|
That description makes no sense though. "You are using elevated rights" is Could you tell me what you want to achieve? |
Powerlevel9k docs also have this sentence:
This also makes no sense. Here's how it actually works:
|
I will focus on LOCAL as the REMOTE context is the same just for SSH connection:
This was the functionality before the changes done in Powerlevel9k/powerlevel9k#937 (but the old functionality had problems with spamming journalctl) |
The old implementation was showing sudo if The old implementation had serious issues. If you actually typed AFAIK, there is no portable (or at least not horrible) way to check whether the current TTY is blessed by sudo. If you know how to do this, please share. |
Just some brainstorming I have not tested this method or thought about implementation with zsh/powerlevel10k:
So in effect we could parse the timestamp for our user in our tty ( |
Yep, I know how it works. The location of the database is different in different distros. On my machine it's in I'm closing this issue if that's OK with you. |
Sure, thanks for going into the details |
The detection of the sudo state of the current terminal is not working as I would think it works from the description.
The current implementation at
powerlevel10k/internal/p10k.zsh
Lines 1479 to 1490 in dfc98ad
It doesn't show when a sudo command without password promt is possible.
More details in the related bug in Powerline9k at:
sudo
detection Powerlevel9k/powerlevel9k#852The text was updated successfully, but these errors were encountered: