[PATCH bash ordered autocomplete] Order the autocompletion in bash

J Rt jean.rblt at gmail.com
Mon Mar 30 12:10:42 CEST 2020


Mmmh, I am afraid some things require bash 4.4.

Should I 'protect' somehow by adding something like this if it is
confirmed to not work on older than 4.4? This should make sure nothing
break, in worst case the 'old' autocompletion ordering should be
presented:

this:

complete -o nosort -o filenames -F _pass pass

can be replaced with this for example:

if [ "${BASH_VERSINFO:-0}" -ge 4 ]; then
    complete -o nosort -o filenames -F _pass pass
else
    complete -o filenames -F _pass pass
fi

On Mon, Mar 30, 2020 at 11:53 AM Pat Burroughs (Celti) <celti at celti.name> wrote:
>
> Excerpts from J Rt's message of March 30, 2020 1:32 am:
> > I implemented the changes you recommended and checked that things work
> > fine in bash, things look good on my machine (bash 4.4.20).
>
> Has anyone checked to see what this patch does on bash versions that
> don't support `-o nosort` — e.g., the bash 3.x that is still the default
> on MacOS?


More information about the Password-Store mailing list