mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-11-16 21:20:08 +00:00
Merge branch 'pr-10692'
This commit is contained in:
commit
cfb9b25ec6
4 changed files with 24 additions and 6 deletions
|
|
@ -94,12 +94,12 @@ no-complete
|
|||
comes with a kitty completion script.
|
||||
|
||||
no-sudo
|
||||
Do not alias :program:`sudo` to ensure the kitty terminfo files are
|
||||
available in the sudo environment. This is needed if you have sudo
|
||||
configured to disable setting of environment variables on the command line.
|
||||
By default, if sudo is configured to allow all commands for the current
|
||||
user, setting of environment variables at the command line is also allowed.
|
||||
Only if commands are restricted is this needed.
|
||||
Do not alias :program:`sudo` and :program:`run0` to ensure the kitty
|
||||
terminfo files are available in the sudo/run0 environment. This is needed
|
||||
if you have sudo configured to disable setting of environment variables on
|
||||
the command line. By default, if sudo is configured to allow all commands
|
||||
for the current user, setting of environment variables at the command line
|
||||
is also allowed. Only if commands are restricted is this needed.
|
||||
|
||||
|
||||
More ways to browse command output
|
||||
|
|
|
|||
|
|
@ -45,6 +45,10 @@ if [[ -n "$KITTY_BASH_INJECT" ]]; then
|
|||
builtin command sudo TERMINFO="$TERMINFO" "$@";
|
||||
fi
|
||||
}
|
||||
run0() {
|
||||
# Ensure terminfo is available in run0, --setenv=NAME copies NAME from the current env
|
||||
builtin command run0 --setenv=TERMINFO "$@";
|
||||
}
|
||||
fi
|
||||
|
||||
if [[ "$kitty_bash_inject" == *"posix"* ]]; then
|
||||
|
|
|
|||
|
|
@ -186,6 +186,16 @@ function __ksi_schedule --on-event fish_prompt -d "Setup kitty integration after
|
|||
end
|
||||
end
|
||||
|
||||
# Same as above for run0
|
||||
if not contains "no-sudo" $_ksi
|
||||
and test -n "$TERMINFO" -a "file" = (type -t run0 2> /dev/null || echo "x")
|
||||
and not test -r "/usr/share/terminfo/x/xterm-kitty" -o -r "/usr/share/terminfo/78/xterm-kitty"
|
||||
# Ensure terminfo is available in run0, --setenv=NAME copies NAME from the current env
|
||||
function run0
|
||||
command run0 --setenv=TERMINFO $argv
|
||||
end
|
||||
end
|
||||
|
||||
# Handle clone launches
|
||||
if test -n "$KITTY_IS_CLONE_LAUNCH"
|
||||
set --local orig_conda_env "$CONDA_DEFAULT_ENV"
|
||||
|
|
|
|||
|
|
@ -431,6 +431,10 @@ _ksi_deferred_init() {
|
|||
builtin command sudo TERMINFO="$TERMINFO" "$@";
|
||||
fi
|
||||
}
|
||||
run0() {
|
||||
# Ensure terminfo is available in run0, --setenv=NAME copies NAME from the current env
|
||||
builtin command run0 --setenv=TERMINFO "$@";
|
||||
}
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue