added a comment

This commit is contained in:
Gyanendra Mishra 2023-02-13 13:01:42 +00:00
parent d115eb6249
commit fcd84a98d1

View file

@ -118,8 +118,13 @@ __%[1]s_process_completion_results() {
fi fi
if (((directive & shellCompDirectiveKeepOrder) != 0)); then if (((directive & shellCompDirectiveKeepOrder) != 0)); then
if [[ $(type -t compopt) == builtin ]]; then if [[ $(type -t compopt) == builtin ]]; then
# no sort isn't supported for bash less than < 4.4
if [[ ${BASH_VERSINFO[0]} -lt 4 || ( ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -lt 4 ) ]]; then
__%[1]s_debug "No sort directive not supported in this version of bash"
else
__%[1]s_debug "Activating keep order" __%[1]s_debug "Activating keep order"
compopt -o nosort compopt -o nosort
fi
else else
__%[1]s_debug "No sort directive not supported in this version of bash" __%[1]s_debug "No sort directive not supported in this version of bash"
fi fi