mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00:00
Clean up login shell environment variable earlier
Does not pollute the environment when executing commands.
This commit is contained in:
parent
5c02c370d4
commit
bc9d6892d4
2 changed files with 4 additions and 6 deletions
|
|
@ -178,12 +178,7 @@ prepare_for_exec() {
|
|||
fi
|
||||
[ -f "$HOME/.terminfo/kitty.terminfo" ] || die "Incomplete extraction of ssh data"
|
||||
|
||||
if [ -n "$KITTY_LOGIN_SHELL" ]; then
|
||||
login_shell="$KITTY_LOGIN_SHELL"
|
||||
unset KITTY_LOGIN_SHELL
|
||||
else
|
||||
using_getent || using_id || using_python || using_perl || using_passwd || using_shell_env || login_shell="sh"
|
||||
fi
|
||||
[ -n "$login_shell" ] || using_getent || using_id || using_python || using_perl || using_passwd || using_shell_env || login_shell="sh"
|
||||
shell_name=$(command basename $login_shell)
|
||||
[ -n "$login_cwd" ] && cd "$login_cwd"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue