Bash: for loop array iteration fix

the array iteration wasn't implemented correctly for KITTY_SHELL_INTEGRATION variable. the i variable in for loop wasn't iterating through all the elements of that array
This commit is contained in:
Silent Crafter 2022-01-06 09:52:59 +05:30 committed by GitHub
parent d3a20f00d6
commit e106562ef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@ _ksi_main() {
if [[ -z "$KITTY_SHELL_INTEGRATION" ]]; then return; fi
declare -A _ksi_prompt=( [cursor]='y' [title]='y' [mark]='y' [complete]='y' )
set -f
for i in ${KITTY_SHELL_INTEGRATION}; do
for i in ${KITTY_SHELL_INTEGRATION[@]}; do
set +f
if [[ "$i" == "no-cursor" ]]; then _ksi_prompt[cursor]='n'; fi
if [[ "$i" == "no-title" ]]; then _ksi_prompt[title]='n'; fi