Port HISTFILE fix to ssh bash launcher
This commit is contained in:
parent
7d653cb7bf
commit
1c558be524
@ -167,7 +167,10 @@ copy --exclude */w.* d1
|
|||||||
continue
|
continue
|
||||||
ok_login_shell = login_shell
|
ok_login_shell = login_shell
|
||||||
with self.subTest(sh=sh, login_shell=login_shell), tempfile.TemporaryDirectory() as tdir:
|
with self.subTest(sh=sh, login_shell=login_shell), tempfile.TemporaryDirectory() as tdir:
|
||||||
self.check_bootstrap(sh, tdir, login_shell)
|
pty = self.check_bootstrap(sh, tdir, login_shell)
|
||||||
|
if login_shell == 'bash':
|
||||||
|
pty.send_cmd_to_child('echo $HISTFILE')
|
||||||
|
pty.wait_till(lambda: '/.bash_history' in pty.screen_contents())
|
||||||
# check that turning off shell integration works
|
# check that turning off shell integration works
|
||||||
if ok_login_shell in ('bash', 'zsh'):
|
if ok_login_shell in ('bash', 'zsh'):
|
||||||
for val in ('', 'no-rc', 'enabled no-rc'):
|
for val in ('', 'no-rc', 'enabled no-rc'):
|
||||||
|
|||||||
@ -214,6 +214,10 @@ shell_name=$(basename $login_shell)
|
|||||||
exec_bash_with_integration() {
|
exec_bash_with_integration() {
|
||||||
export ENV="$shell_integration_dir/bash/kitty.bash"
|
export ENV="$shell_integration_dir/bash/kitty.bash"
|
||||||
export KITTY_BASH_INJECT="1"
|
export KITTY_BASH_INJECT="1"
|
||||||
|
if [ -z "$HISTFILE" ]; then
|
||||||
|
export HISTFILE="$HOME/.bash_history"
|
||||||
|
export KITTY_BASH_UNEXPORT_HISTFILE="1"
|
||||||
|
fi
|
||||||
exec "$login_shell" "--posix"
|
exec "$login_shell" "--posix"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user