Another use of builtin

This commit is contained in:
Kovid Goyal 2022-01-14 23:28:10 +05:30
parent 96269510d3
commit 35207af3de
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -113,7 +113,7 @@ _ksi_main() {
# otherwise append a string
if [[ -z "${PROMPT_COMMAND}" ]]; then
PROMPT_COMMAND=([0]="_ksi_prompt_command")
elif [[ $(declare -p PROMPT_COMMAND 2> /dev/null) =~ 'declare -a PROMPT_COMMAND' ]]; then
elif [[ $(builtin declare -p PROMPT_COMMAND 2> /dev/null) =~ 'declare -a PROMPT_COMMAND' ]]; then
PROMPT_COMMAND+=("_ksi_prompt_command")
else
PROMPT_COMMAND+="; _ksi_prompt_command"