pub fn bash_assignment_string(
name: &str,
attrs: &str,
shape: &BashParamShape<'_>,
) -> StringExpand description
bash ${var@A} — the assignment statement that would recreate the
parameter with its attributes.
attrs is the attribute-letter string bash_attr_letters produces; an
empty one means bash omits the declare word entirely.
$ bash -c 'v=abc; printf "<%s>" "${v@A}"' → <v='abc'>
$ bash -c 'declare -i n=5; printf "<%s>" "${n@A}"' → <declare -i n='5'>
$ bash -c 'a=(x "y z"); printf "<%s>" "${a[*]@A}"' → <declare -a a=([0]="x" [1]="y z")>
$ bash -c 'declare -A h=([q]=1); printf "<%s>" "${h[*]@A}"'
→ <declare -A h=([q]="1" )>