[PATCH bash ordered autocomplete] Order the autocompletion in bash

Reed Wade reedwade at misterbanal.net
Tue Apr 7 15:48:59 CEST 2020


Hello back !

Sorry for big delay, Migadu got problems with imap access cause of
recent events.

> - the version I sent last time works.

cool !

> - the version with the local var taken away and the "" protection works:

cool !

> _append_to_compreply () {
>     local IFS=" "
>     for word in "$(_sort_entries_string "$1")"; do
>         COMPREPLY+=($word)
>     done
> }
> 
> - this does not work (with uncommented IFS it works as shown on the
> previous point), so I think the IFS var is needed. :
>
> bla bla bla

Aha yup. I just discovered some days ago bash actualy use something
called "dynamic scopes". In short, if a var is define outside of the
scope, bash update this variable value. Except if "local" is used ofc.

Is it possible to add "local IFS" where needed ? This will make the
_append_to_compreply IFS useless right ?


More information about the Password-Store mailing list