Skip to content

Commit

Permalink
Only use nosort in bash <4.4 (#1683)
Browse files Browse the repository at this point in the history
* Only use `nosort` in bash <4.4

* Fix bad parameter order
  • Loading branch information
martinml committed May 10, 2024
1 parent 97839c6 commit 0f8a2f0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion etc/completion/completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -375,4 +375,9 @@ _delta() {
esac
}

complete -F _delta -o nosort -o bashdefault -o default delta
# nosort 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
complete -F _delta -o bashdefault -o default delta
else
complete -F _delta -o bashdefault -o default -o nosort delta
fi

0 comments on commit 0f8a2f0

Please sign in to comment.