Ensure IFS is correct when iterating over KITTY_SHELL_INTEGRATION

This commit is contained in:
Kovid Goyal 2022-04-12 23:03:05 +05:30
parent 073eecb6bb
commit 7788f48dd5
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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