mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-16 21:45:03 +02:00
Dont rely on declare -g existing in bash
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# this is defined outside _ksi_main to make it global without using declare -g
|
||||
# which is not available on older bash
|
||||
declare -A _ksi_prompt=( [cursor]='y' [title]='y' [mark]='y' [complete]='y' [ps0]='' [ps1]='' [ps2]='' )
|
||||
|
||||
_ksi_main() {
|
||||
if [[ $- != *i* ]] ; then return; fi # check in interactive mode
|
||||
if [[ -z "$KITTY_SHELL_INTEGRATION" ]]; then return; fi
|
||||
declare -g -A _ksi_prompt=( [cursor]='y' [title]='y' [mark]='y' [complete]='y' [ps0]='' [ps1]='' [ps2]='' )
|
||||
set -f
|
||||
for i in ${KITTY_SHELL_INTEGRATION[@]}; do
|
||||
set +f
|
||||
|
||||
Reference in New Issue
Block a user