From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 344995135488 X-Google-Groups: supmua X-Google-Thread: 3030fda1bf,1711719559b2ece4 X-Google-Attributes: gid3030fda1bf,domainid0,public,googlegroup X-Google-NewGroupId: yes X-Received: by 10.180.37.105 with SMTP id x9mr801760wij.7.1416136350291; Sun, 16 Nov 2014 03:12:30 -0800 (PST) X-BeenThere: supmua@googlegroups.com Received: by 10.180.74.73 with SMTP id r9ls606193wiv.3.canary; Sun, 16 Nov 2014 03:12:29 -0800 (PST) X-Received: by 10.180.182.164 with SMTP id ef4mr3179076wic.0.1416136349959; Sun, 16 Nov 2014 03:12:29 -0800 (PST) Return-Path: Received: from mout.web.de (mout.web.de. [212.227.15.3]) by gmr-mx.google.com with ESMTPS id jw5si422812wid.2.2014.11.16.03.12.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Nov 2014 03:12:29 -0800 (PST) Received-SPF: pass (google.com: domain of ruthard.baudach@web.de designates 212.227.15.3 as permitted sender) client-ip=212.227.15.3; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ruthard.baudach@web.de designates 212.227.15.3 as permitted sender) smtp.mail=ruthard.baudach@web.de Received: from localhost ([178.7.1.247]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0MGifp-1XltHx0WB7-00DZNQ; Sun, 16 Nov 2014 12:12:28 +0100 From: Ruthard Baudach To: Gaute Hope Cc: supmua Subject: Re: [sup] [PATCH] added command line argument to sup invocation: "sup email-address" invokes sup in command line In-reply-to: <1415959463-astroid-0-4xu4dq0h0g-7223@strange> References: <1415471780-sup-1914@ruthard-lappi> <1415959463-astroid-0-4xu4dq0h0g-7223@strange> Date: Fri, 14 Nov 2014 22:48:46 +0100 Message-Id: <1416000203-sup-9655@ruthard-lappi> User-Agent: Sup/0.20.0 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=-1416001733-95014-4899-3007-1-=" X-Provags-ID: V03:K0:bRqLGFD67WQMZzLURfYGm7cqtoTplF/IO9UVuGt1OQSxuqrLt/o Ex0KMdABSZk/guymyDj0m/xrkixjqEkgh8kwXhtgBToOfJEVw6Qb/uQH4EFhnq/jR3UFZWy hafR3J1Gxg8FB9W4suuZyYsff5BqtSrOL+VR/w17g8u0zCFaRIwsuHYd6jMqv7V+hFIujiN o5g64Cakz9H62lHl7CRag== X-UI-Out-Filterresults: notjunk:1; --=-1416001733-95014-4899-3007-1-= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable >=3D=3D Ausz=C3=BCge aus der Nachricht von Gaute Hope vom 2014-11-14 11:= 13: > got a few comments below [btw: it is better to send a completely new > patch with your changes squashed together than to send incremental > changes to the first patch]. I still have to master this "stupid content tracker". Hope to figure it out. > > Sup is a curses-based email client. > > = > > Usage: > > - sup [options] > > + sup [options] [to-address] > > + > > +Arguments: > > + to-address: Compose message to this recipient upon sta= rtup > > + --compose overrides an address passed as a= rgument > = > ^^ i think it would be better to fail if --compose is specified in addi= tion to > an unnamed argument, what happens if i want to specify many addresses? > what do you think? I had trouble to figure out how --compose works. As far as I found out by now it accepts exact ONE argument, which might be a string containing a list of well formatted email addresses. No checks are done, sup --compose "This is all a terrible nonsense" will happily compose an email with a "To: This is all a terrible nonsense" header. Thus I think I could just add the arguments to compose and ARGV.join(' ')= , check this combined address list with RMail::Address.parse, inform the user if the mails are not well formed, and pass the list happily to the existing code This way the option --compose and any command arguments would work seamlessly together. What do you think? > > = > > +## Trollop does no command argument parsing, only option parsing. > > +# After Trollop parsing, ARGV contains only the +rest+ of the comman= d line, > > +# thus the arguments to our program > > +## compose message if we have an email address as first command line= argument > = > add '.' sorry, yes > , why different levels of '#' ? = a habit I took from lisp and bash, somehow feels like structuring comments and code > try to stay at approx 80 > char width. I do like Python, my vim is set to tw=3D80 for all of my work. Well, usually. Yours, Ruthard -- = Please encrypt and sign emails. My PGP-Id: AC5AC6C2 --=-1416001733-95014-4899-3007-1-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJUZnjFAAoJEA852hysWsbCBCUH/3yf48fUytcGctw9vYAN3DtR m6oBrXxMOd7Kxd4BarJ+uoYt3mXU6ApMwuRn5jH1H77kLabEr8IbRbnRnJXa9eEd Wr5+WedVdqw73wyZHjHRHkG5NmDGx3H5mZJ7wslHi5K9xhQ7S4tkmQGN72525Z5N P9AMentNhyxWWG1qSnVh5OoYTGhVyfqIxrJ69kPC+TZFMf81/FBxGf+rSum7WzH0 smBzzcMDACnYx0ekFD2X1nbAKw/quc/JOckDxHC9QNXFecj/cE0txskqN6CcE1YQ QK+xSrDXcRIdOdT5dcLcxQny5NIhfYr4rfRHVX4HUh1KLqo3IVB/uXe6B379/3c= =5pwz -----END PGP SIGNATURE----- --=-1416001733-95014-4899-3007-1-=--