pjs@euclid.jpl.nasa.gov (Peter Scott) (02/07/91)
Is there any way to cause the "set sign=" command to
include a file (say, oh, pulling a name out of the air,
~/.signature) as the autograph?
Also, how can the argument to the "set sign=" command contain
both single (') and double (") quotes that are correctly
reproduced upon ~a?
--
"Diane, I'm holding in my hand | Peter Scott, NASA/JPL/Caltech
a small box of chocolate bunnies" | (pjs@euclid.jpl.nasa.gov)greywolf@unisoft.UUCP (The Grey Wolf) (02/14/91)
In article <1991Feb6.185423.16803@elroy.jpl.nasa.gov> pjs@euclid.jpl.nasa.gov writes: >Is there any way to cause the "set sign=" command to >include a file (say, oh, pulling a name out of the air, >~/.signature) as the autograph? > >Also, how can the argument to the "set sign=" command contain >both single (') and double (") quotes that are correctly >reproduced upon ~a? I'm not aware of any "set sign=" command in BSD Mail; however you could always switch mailers and use Mush instead (it's a better mailer anyway).
morgan@ogicse.ogi.edu (Clark O. Morgan) (02/14/91)
In article <3380@unisoft.UUCP> greywolf@unisoft.UUCP (The Grey Wolf) writes: >In article <1991Feb6.185423.16803@elroy.jpl.nasa.gov> pjs@euclid.jpl.nasa.gov writes: >>Is there any way to cause the "set sign=" command to >>include a file (say, oh, pulling a name out of the air, >>~/.signature) as the autograph? >> >>Also, how can the argument to the "set sign=" command contain >>both single (') and double (") quotes that are correctly >>reproduced upon ~a? > >I'm not aware of any "set sign=" command in BSD Mail; however you could >always switch mailers and use Mush instead (it's a better mailer anyway). Re: switching to Mush...that's a big thumbs up from me, as well. In fact, just to whet your appetite: Mush gives you two signatures. One signature can be set for local addresseess, presumably your colleagues, who probably don't want a lot of clutter in your messages. The other signature is applied to the messages addressed to all other (non-local) addressees, who would presumably like to see your return address at the bottom (along with your favorite pithy saying). And of course, being Mush, either signature may be specified "inline" or from a user-specified file. One more hint about the scope of this program...the last time I printed the Mush man page, it contained 86 pages of information and features. Oh, and it has three human interfaces: shell, Curses, Sun Tool. ======================================================= The source is available via anonymous ftp from cse.ogi.edu, in pub/mush/mush-7.2.tar.Z . -- Clark O. Morgan morgan@cse.ogi.edu ...!uunet!ogicse!morgan "Game over!! Game over!!" (Hudson, "Aliens")
sahayman@iuvax.cs.indiana.edu (Steve Hayman) (02/14/91)
Here is a trick for including a .signature with stock BSD mail, which
doesn't have a "sign" variable or anything like that.
Recall that when composing a message, ~v and ~e both invoke
editors on the message. If you were so inclined you could arrange to
use a different editor program with each of ~v and ~e, by doing
this in the .mailrc
set VISUAL=/usr/ucb/vi
set EDITOR=/usr/local/bin/emacs
which would invoke vi when you used ~v, and emacs when you use ~e.
Now there is really no reason why both of these programs have
to be actual text editors. One could be a program that adds
a .signature. That's what I do - I use ~v to edit messages
(with vi) and ~e to add a .signature. I have this in my .mailrc
set VISUAL=/usr/ucb/vi
set EDITOR=/u/sahayman/bin/addsig
where "addsig" is a little program that just appends a .signature
file to the file it's given on the command line. This is
the "addsig" script, which will add a .signature to a mail
message when you type ~e . I use it all the time. Works great.
#!/bin/sh
# addsig - hack that adds a signature to $1
# Useful within mail, do a "set EDITOR=/u/sahayman/bin/addsig" in the .mailrc
# and then "~e" becomes a command which adds a signature to a message.
# You can still use ~v to edit mail, since it uses VISUAL
#
# Steve Hayman
# sahayman@cs.indiana.edu
# I don't want mine included by default by anything, so I call it ".sig"
signature=${HOME}/.sig
if [ ! -f $signature ]; then
echo "${0}: No signature file $signature" 1>&2
exit 1
fi
case $# in
0) # add to stdin, useful as a vi filter
cat
echo "-- "
cat $signature
;;
*)
(echo "-- "; cat $signature) >>$1
;;
esacjensen@diku.dk (J|rgen Jensen) (02/15/91)
pjs@euclid.jpl.nasa.gov (Peter Scott) writes: >[...] >Also, how can the argument to the "set sign=" command contain >both single (') and double (") quotes that are correctly >reproduced upon ~a? You could just reverse the character used for quoting, as needed. E.g.: set sign="I'm a "'real "neeb"' Works for me anyway. (Note: the word "neeb" was chosen for purposes of illustration only.) -- . . . . . . . . . . . . . . . . . . . . . . . . . . j e n s e n (jensen@diku.dk) Opinions? -- These are rock-solid facts!