What is Nostr?
menherahair /
npub1n78…87ev
2024-03-24 13:29:13
in reply to nevent1q…fxy5

menherahair on Nostr: eisai >The array itself, yes, but the item named “sequence” seems nowhere to be ...

eisai (npub13nf…f7eq)
>The array itself, yes, but the item named “sequence” seems nowhere to be defined.
Oh, sorry, I thought this was what confused you because I personally think that's confusing, when most of the code is very careful about this.

The array is build dynamically, see:
> 163 local -A uservars
> 164 local name val
> 165 while IFS=: read -r name val; do
> 166 [[ -z "$name" ]] && continue
> 167 val="${val# }"
> 168 uservars["${name}"]="$val"
> 169 done

It's parsing password files used in pass, which by mere convention look like this:
> correct horse battery staple
> login: wojtekwarrior97
> email: wojtek97@interia.pl
> more arbitrary fields that actually do nothing: it's just what `pass` recommends for some coherence between helper scripts and plugins

So the user is expected to setup one for this feature to work:
> sequence: $login \t %s \n
Otherwise it falls back to the wordy $PASS_ZENITY_DEFAULT_SEQUENCE, and if that's empty it fails.

>I have a suspicion, that they’re in fact not. Try inserting
>declare -p env_default_sequence
>right after the call to _globals()
Works fine:
> kishu ~/git/pass-zenity $ PASSWORD_STORE_EXTENSIONS_DIR=. PASS_ZENITY_DEFAULT_SEQUENCE=pizza bash $(command -v pass) zenity --sequence --typetool cat
> pizza
> kishu ~/git/pass-zenity $ g env_ out
> declare -r env_default_sequence="pizza"
> declare -r env_directory="/home/menherahair/.local/password-store"
> declare -r env_height=""
Author Public Key
npub1n783957maa2g7rpdyd5knx0whfggllws33clq9qg4dme3wauxrvq6q87ev