You are not logged in.
I have zsh, configured with grml-zsh-config. I also have a .zshrc file with a very minimal configuration.
The completion used to work well, but know it doesn't work with sudo commands. I mean that if you type `sudo pacman -` and tab, instead of printing all possible options (-S, -F, -R...) it tries to complete with files. However `pacman -` and tab works perfectly well. It happens to all sudo commands.
I have removed zsh-completions, grml-zsh-config and it didn't fix it. I have also reinstalled zsh with the same result.
I know that if I delete .zshrc the completion works perfectly well, but I need my configuration. Even if .zshrc is completely empty the completion does not work well.
I have tried to solve it for some time, but I din`t find anything useful.
Last edited by RodAlc (2023-10-30 08:40:13)
Offline
Same issue suddenly occurred here. I haven’t changed my configuration recently.
I’ll let you know if I find a solution.
Offline
How "recently"?
/usr/share/zsh/functions/Completion/Unix/_sudo is provided by zsh which saw the last update in July, grml-zsh-config (using that as well?) in June.
I know that if I delete .zshrc the completion works perfectly well, but I need my configuration. Even if .zshrc is completely empty the completion does not work well.
Errr… WHAT?
1. the grml zshr will also source $HOME/.zshrc.pre and $HOME/.zshrc.local, so you might utilize those, however:
2. post everything /etc/zsh* and ~/.zsh* - if the mere presence OF THE EMPTY FILE impacts the behavior, this suggest something™ checks for it and aborts at this point.
Does either of you use something stupid like OMZ?
Offline
I have solved it.
It was nothing related to zsh, it was kitty terminal setting an alias to sudo. I just needed to configure `shell_integration no-sudo` in kitty.conf and everything works well.
I hope it helps you Markus
(And no, I don't use OMZ)
Offline
I would say the real fix here is to dump kitty. Any upstream who thinks this is the right thing to do is not one you should use.
Online
I was about to say that VTE does likewise dumb shit, but it's actually not /that/ dumb:
https://github.com/kovidgoyal/kitty/com … 6533ab04d2
And believe it or not, their faq actually explains the proper approach to this
https://github.com/kovidgoyal/kitty/com … 0da562448d
https://sw.kovidgoyal.net/kitty/faq/#i- … don-t-work
Not entirely sure how the existing ~/.zshrc becomes relevant or why kitty depends on $TERMINFO, but either way:
It causes an undisputable bug that you want to report upstream and while it's entirely not the TE's job to "fix" the users shell, the proper approach for any of this is a drop-in in /etc/sudoers.d
Offline