diff --git a/src/etc/completions/x.py.sh b/src/etc/completions/x.py.sh index f739f46b88bb2..37b7fe1e082bc 100644 --- a/src/etc/completions/x.py.sh +++ b/src/etc/completions/x.py.sh @@ -1761,4 +1761,8 @@ _x.py() { esac } -complete -F _x.py -o nosort -o bashdefault -o default x.py +if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then + complete -F _x.py -o nosort -o bashdefault -o default x.py +else + complete -F _x.py -o bashdefault -o default x.py +fi