summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2017-04-30 08:20:45 (GMT)
committer Jaromil <jaromil@dyne.org>2017-04-30 08:20:45 (GMT)
commitc3b9f1265c10648948bbf09b4448d673ba78b5e6 (patch)
tree3b8e3c29a4286871a7eeb1bc771af5db7676156b
parentc66146b6276c2b31937a28228167126aa3a08529 (diff)
parse account on stdin_compose
also normalised some act messages
-rwxr-xr-xsrc/jaro18
-rwxr-xr-xsrc/zlibs/accounts1
-rwxr-xr-xsrc/zlibs/email1
-rwxr-xr-xsrc/zlibs/mutt2
4 files changed, 11 insertions, 11 deletions
diff --git a/src/jaro b/src/jaro
index 4530949..87fdac8 100755
--- 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
index b6abc9e..d1d69fa 100755
--- 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
index d113ecf..a354a03 100755
--- 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
index c78b4e5..43c2fbb 100755
--- 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