aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2009-08-15 21:42:19 +0000
committerUlrich Müller <ulm@gentoo.org>2009-08-15 21:42:19 +0000
commit0ef0cf6b3c0ddc6ce2e9fc8534cb3faabab47190 (patch)
treeb87662df1deaf1013fde16fe5ce4e17e42784c04 /modules/news.eselect
parentRemove calls to pushd and popd. (diff)
downloadeselect-0ef0cf6b3c0ddc6ce2e9fc8534cb3faabab47190.tar.gz
eselect-0ef0cf6b3c0ddc6ce2e9fc8534cb3faabab47190.tar.bz2
eselect-0ef0cf6b3c0ddc6ce2e9fc8534cb3faabab47190.zip
Fix whitespace in output if name is empty.
svn path=/trunk/; revision=616
Diffstat (limited to 'modules/news.eselect')
-rw-r--r--modules/news.eselect4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/news.eselect b/modules/news.eselect
index 5b8f269..27b42c2 100644
--- a/modules/news.eselect
+++ b/modules/news.eselect
@@ -125,7 +125,7 @@ rfc2047_encode() {
mail_header() {
local item=$1 author=$2 title=$3 posted=$4
local -a mname=( 0 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
- local year=0001 month=01 day=01 time="00:00:00" wd addr name
+ local year=0001 month=01 day=01 time="00:00:00" wd addr="unknown" name
# "date -d" is not portable, therefore we do manual processing
if [[ ${posted} == +([0-9])-+([0-9])-+([0-9]) ]]; then
@@ -148,7 +148,7 @@ mail_header() {
[[ ${title} != *([[:ascii:]]) ]] && title=$(rfc2047_encode "${title}")
echo "From ${addr} ${wd} ${mname[month]} ${day} ${time} ${year}"
- echo "From: ${name} <${addr}>"
+ echo "From: ${name}${name+ }<${addr}>"
#echo "Reply-To: DO NOT REPLY <devnull@localhost.invalid>"
echo "Subject: ${title}"
echo "Date: ${wd}, ${day} ${mname[month]} ${year} ${time} +0000"