diff --git a/docs/changelog.rst b/docs/changelog.rst index 37e4695cb..a149d3f86 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -75,6 +75,15 @@ command. Detailed list of changes ------------------------------------- +0.24.4 [2022-02-28] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- Fix the default bash HISTFILE changing to :file:`~/.sh_history` instead of :file:`~/.bash_history` (:iss:`4765`) + +- Linux binaries: Fix binaries not working on systems with older wayland client + libraries (:iss:`4760`) + +- Bash integration: No longer modify :file:`~/.bashrc` to load :ref:`shell integration `. 0.24.3 [2022-02-28] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/shell_integration.py b/kitty/shell_integration.py index e0d6332f0..d044e883c 100644 --- a/kitty/shell_integration.py +++ b/kitty/shell_integration.py @@ -93,6 +93,10 @@ def setup_bash_env(env: Dict[str, str], argv: List[str]) -> None: env['KITTY_BASH_RCFILE'] = rcfile for i in sorted(remove_args, reverse=True): del argv[i] + if 'HISTFILE' not in env and 'posix' not in inject: + # In POSIX mode the default history file is ~/.sh_history instead of ~/.bash_history + env['HISTFILE'] = os.path.expanduser('~/.bash_history') + env['KITTY_BASH_UNEXPORT_HISTFILE'] = '1' argv.insert(1, '--posix') diff --git a/shell-integration/bash/kitty.bash b/shell-integration/bash/kitty.bash index e86f85949..d8ab21a46 100644 --- a/shell-integration/bash/kitty.bash +++ b/shell-integration/bash/kitty.bash @@ -41,6 +41,11 @@ _ksi_main() { _ksi_safe_source "$KITTY_BASH_POSIX_ENV" && builtin export ENV="$KITTY_BASH_POSIX_ENV"; else builtin set +o posix; + if [[ -n "$KITTY_BASH_UNEXPORT_HISTFILE" ]]; then + export -n HISTFILE; + unset KITTY_BASH_UNEXPORT_HISTFILE; + fi + # See run_startup_files() in shell.c in the Bash source code if builtin shopt -q login_shell; then if [[ "$KITTY_BASH_INJECT" != *"no-profile"* ]]; then