bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-mailutils] [PATCH} comsatd: friendlier `echo' command


From: Damon Harper
Subject: [bug-mailutils] [PATCH} comsatd: friendlier `echo' command
Date: Fri, 25 Aug 2006 16:03:31 -0700
User-agent: Mutt/1.4.2.2i

hi again folks -

one more patch.  i found i was hankering for a friendlier, more
shell-like `echo' command in comsatd's .biffrc files, and after poking
around in the argcv functions i realised it would be pretty easy to
do.  rather than having to quote a single string, use \n, and make
sure to continue lines with a trailing \, i thought it would be much
prettier if i could just write what looks like a regular shell script.

so the attached patch (when combined with my last one
(mailutils-1.0-escape-fix-0.1.patch - without that this won't work
perfectly) allows me to write my .biffrc like this:

echo
echo New mail for address@hidden:
echo ---
echo From: $H{From}
echo Subject: $H{Subject}
echo $B(,5)---

the old-style fully-quoted construction will still work, the only
backwards-incompatibility being that an extra newline will be
appended.  this seems pretty minor to me, so hopefully it won't be an
issue for anyone.

quoting of course also works:

echo "Quoted    extra    spaces"

and it also recognises -n as the first parameter, like the shell
`echo':

echo -n No newline after this line.

this also has the advantage that arguments beyond the first to the
`echo' command are no longer just silently ignored; before, without
quoting, doing something like:

echo New mail for $u

would have just printed `New' to the terminal, which was rather
confusing if you intuitively went for shell syntax.

would people be willing to merge this, along with the fixes previously
posted?

-damon

Attachment: mailutils-1.0-comsatd-action_echo-0.1.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]