%commit
EOF
fi
-caps=$(
- "$tool"/remote/gpg --with-colons --fixed-list-mode --with-fingerprint --list-secret-keys \
- -- "$uid" |
- sed -e 's/^ssb\(:[^:]*\)\{11\}.*/\1/;t;d'
- )
+caps=$("$tool"/remote/gpg --with-colons --fixed-list-mode --with-fingerprint --list-secret-keys \
+ -- "$uid" | grep '^ssb:' | cut -d : -f 12)
for cap in ${subkey_caps:-}
do
- test ! "$caps" = "$(printf %s "$caps" | sed -e 's/'"$cap"'//g')" ||
+ printf '%s\n' $caps | grep -Fqx "$cap" ||
printf '%s\n' 8 s e $cap q 4096 ${expire:-0} save |
"$tool"/remote/gpg --keyid-format "long" --with-colons --fixed-list-mode --expert \
--passphrase-fd 3 --command-fd 0 --edit-key "$uid" addkey 3<<-EOF