Fix Bash integration

* integration/bash (__eat_enable_integration): Fix moving
'PROMPT_COMMAND' array elements.
This commit is contained in:
Akib Azmain Turja 2022-12-04 16:57:47 +06:00
parent a95ca85927
commit ccc405ec14
No known key found for this signature in database
GPG key ID: 5535FCF54D88616B

View file

@ -65,8 +65,8 @@ __eat_enable_integration ()
# use something as silly and pityful as 'VAR=$PROMPT_COMMAND' to
# copy a Bash array in VSCode Bash integration script, that simply
# won't work ever, and then complain about Bash in the comments!
# LOL. ;D
for i in $(eval "printf {${#PROMPT_COMMAND[*]}..1..-1}")
# LOL. xD
for i in $(eval "echo {${#PROMPT_COMMAND[*]}..1..-1}")
do
PROMPT_COMMAND[$i]=${PROMPT_COMMAND[$((i-1))]}
done