commit c3b9f1265c10648948bbf09b4448d673ba78b5e6
parent c66146b6276c2b31937a28228167126aa3a08529
Author: Jaromil <jaromil@dyne.org>
Date: Sun, 30 Apr 2017 10:20:45 +0200
parse account on stdin_compose
also normalised some act messages
Diffstat:
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/jaro b/src/jaro
@@ -128,7 +128,7 @@ global_quit=0
# global variable for account selection
vars+=(account account_type)
-# account=default
+account=default
vars+=(list)
list=whitelist
@@ -209,10 +209,10 @@ if [ -d $WORKDIR/zlibs ]; then
done
fi
- act "full set of auxiliary functions loaded"
+ func "full set of auxiliary functions loaded"
elif [[ $1 = source ]]; then
- act "limited set of auxiliary functions loaded"
+ act "limited set of auxiliary functions sourced"
else
error "No ZLibs found in $WORKDIR/zlibs"
@@ -590,13 +590,11 @@ main() {
exitcode=$?
;;
- fetch)
- account=${account:-default}
- fetch ${option_params} && \
- update_filters && \
- filter_maildir incoming && \
- update_notmuch
- ;;
+ fetch) fetch ${option_params} && \
+ update_filters && \
+ filter_maildir incoming && \
+ update_notmuch
+ ;;
send) send ${option_params}
exitcode=$?
diff --git a/src/zlibs/accounts b/src/zlibs/accounts
@@ -148,6 +148,7 @@ read_account() {
{ test -z $accountopt } && { accountopt=keep }
# cert and password can be missing
+ act "account in use: $login"
func "name: $name"
func "email: $email"
func "login: $login"
diff --git a/src/zlibs/email b/src/zlibs/email
@@ -56,6 +56,7 @@ stdin_compose() {
act "recipients: ${_addrs}"
[[ "$_files" = "" ]] || act "attachments: ${_files}"
act "subject: $subject"
+ read_account ${account}
cat <<EOF | x_mutt -s "${subject// /_}" -i $ztmpfile ${=_files} -- ${=_addrs}
EOF
# _mutt -H <(print "To: ${option_params}")
diff --git a/src/zlibs/mutt b/src/zlibs/mutt
@@ -63,7 +63,7 @@ x_mutt() {
gpgkey=""
[[ -r $HOME/.gnupg/gpg.conf ]] && {
gpgkey=`awk '/^default-key/ { print $2 }' $HOME/.gnupg/gpg.conf`
- act "default GPG key configured: $gpgkey"
+ act "GPG key in use: $gpgkey"
}
cat<<EOF > "$MAILDIRS/.mutt"/rc