mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
fish integration: Dont clobber user defined sudo function
This commit is contained in:
parent
f3ece8b7c4
commit
7e1580ef09
1 changed files with 4 additions and 3 deletions
|
|
@ -108,9 +108,10 @@ function __ksi_schedule --on-event fish_prompt -d "Setup kitty integration after
|
|||
__update_cwd_osc
|
||||
end
|
||||
|
||||
if not contains "no-sudo" $_ksi and test -n "$TERMINFO"
|
||||
# Note that neither alias nor function is recursive in fish so if the user defines an alias/function
|
||||
# for sudo it will clobber us
|
||||
# Note that neither alias nor function is recursive in fish so if the user defines an alias/function
|
||||
# for sudo it will be clobbered by us, so only install this is sudo is not already function
|
||||
if not contains "no-sudo" $_ksi
|
||||
and test -n "$TERMINFO" -a "file" = (type -t sudo)
|
||||
# Ensure terminfo is available in sudo
|
||||
function sudo
|
||||
set --local is_sudoedit "n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue