bash error "-bash: complete: nosort: invalid option name"

For me, this was due to an incompatible version of complete being used with the WireGuard wg and wg-quick commands bash completion scripts installed by brew

cd /usr/local/etc/bash_completion.d/ edit wg modify the last line from complete -o nosort -F _wg_completion wg to complete -F _wg_completion wg save wg

edit wg-quick modify the last line from complete -o filenames -o nosort -F _wg_quick_completion wg-quick to complete -o filenames -F _wg_quick_completion wg-quick

This article was updated on 2023-01-25

I'm nabeards.

I'm a full stack JavaScript developer.

I travel full time, a.k.a., Professional Wanderer, a.k.a., Digital Nomad.