From 7788f48dd5f09506953c73f77cb71ce7f1b2f897 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 12 Apr 2022 23:03:05 +0530 Subject: [PATCH] Ensure IFS is correct when iterating over KITTY_SHELL_INTEGRATION --- shell-integration/bash/kitty.bash | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shell-integration/bash/kitty.bash b/shell-integration/bash/kitty.bash index d36921cc3..a7bae0184 100644 --- a/shell-integration/bash/kitty.bash +++ b/shell-integration/bash/kitty.bash @@ -78,6 +78,8 @@ _ksi_prompt=( ) _ksi_main() { + builtin local ifs="$IFS" + IFS=" " for i in ${KITTY_SHELL_INTEGRATION[@]}; do case "$i" in "no-cursor") _ksi_prompt[cursor]='n';; @@ -87,6 +89,7 @@ _ksi_main() { "no-cwd") _ksi_prompt[cwd]='n';; esac done + IFS="$ifs" builtin unset KITTY_SHELL_INTEGRATION