mirror of
https://github.com/spf13/cobra
synced 2025-05-05 04:47:22 +00:00
added a comment
This commit is contained in:
parent
d115eb6249
commit
fcd84a98d1
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||||
__%[1]s_debug "Activating keep order"
|
# no sort isn't supported for bash less than < 4.4
|
||||||
compopt -o nosort
|
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"
|
||||||
|
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
|
||||||
|
|
Loading…
Add table
Reference in a new issue