-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 alias in shell integration breaks sudo --edit
#6754
Comments
It's a simple alias, changing it to a function and parsing sudo command
Although I have to say, sudo -e is absurdly insecure. It allows any |
For this case the solution is simple enough. I can't speak for other shells, but for fish it's to change kitty/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish Lines 113 to 115 in b1ec1c2
to if test -n "$TERMINFO"
function sudo
if ! contains -- --edit $argv && ! contains -- -e $argv
set --prepend argv TERMINFO="$TERMINFO"
end
command sudo $argv
end
end (The shell integration should better use
I won't argue with that, just the error message is too cryptic unless you already know kitty will alias sudo (as I suppose few people would do that themselves). |
Nope, that will break when using sudo to run a command that happens to sudo grep -e whatever |
Maybe this should go into a separate issue but this integration also breaks
|
If your sudo is configured to not allow setting TERMINFO at all, then |
As an alternative to disabling aliasing in kitty.conf you can also enable TERMINFO to be conveyed via sudo by placing this in your
|
Describe the bug
d96fdb8 introduced sudo alias which does not work with
sudo --edit
(orsudo -e
).The integration will need to check for the flag before adding the environment variable.
To Reproduce
Steps to reproduce the behavior:
no-sudo
sudo -e
Screenshots
N/A
Environment details
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: