From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 290372714496 X-Google-Groups: supmua X-Google-Thread: 3030fda1bf,83d4144633313afc X-Google-Attributes: gid3030fda1bf,domainid0,public,googlegroup X-Google-NewGroupId: yes X-Received: by 10.180.74.130 with SMTP id t2mr2752216wiv.4.1414659439033; Thu, 30 Oct 2014 01:57:19 -0700 (PDT) X-BeenThere: supmua@googlegroups.com Received: by 10.152.37.226 with SMTP id b2ls289646lak.36.gmail; Thu, 30 Oct 2014 01:57:18 -0700 (PDT) X-Received: by 10.152.21.170 with SMTP id w10mr263650lae.6.1414659438471; Thu, 30 Oct 2014 01:57:18 -0700 (PDT) Return-Path: Received: from mout.web.de (mout.web.de. [212.227.17.12]) by gmr-mx.google.com with ESMTPS id ea4si1011638lbc.0.2014.10.30.01.57.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Oct 2014 01:57:18 -0700 (PDT) Received-SPF: pass (google.com: domain of ruthard.baudach@web.de designates 212.227.17.12 as permitted sender) client-ip=212.227.17.12; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ruthard.baudach@web.de designates 212.227.17.12 as permitted sender) smtp.mail=ruthard.baudach@web.de Received: from ruthard-lappi.fritz.box ([94.217.201.160]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0Lp6xk-1YFVOb3pG0-00eprz for ; Thu, 30 Oct 2014 09:57:18 +0100 From: Ruthard Baudach To: supmua Subject: Re: [sup] calling sup with email address as argument In-reply-to: <1414658379-astroid-1-lcvfs1mnt9-2157@strange> References: <1414658155-sup-3764@ruthard-lappi> <1414658379-astroid-1-lcvfs1mnt9-2157@strange> Date: Thu, 30 Oct 2014 09:57:12 +0100 Message-Id: <1414658899-sup-2941@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="=-1414659436-871081-2517-9172-1-=" X-Provags-ID: V03:K0:3B1Y+DR914N5QIi/eZGCFfayqorr3X7anf2+MVBxeVLbc91u5V6 mfheTsBXxkAx+h4cIDOMowI4uD8ZkTN6eMgpBv7nmLnb9/XOQIZ47TQRBdZMdznK/lgTmn8 0rDEWpw4j/E3V3J/Ti+5gf/dDmqGLmmiVmaHrV6PLUcsOh0sm+Fu2OEFXRNJL6ICeN60rBY uNrPiPj4zf5ycQ6y8E+tg== X-UI-Out-Filterresults: notjunk:1; --=-1414659436-871081-2517-9172-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-10-30 09:= 43: > Excerpts from Ruthard Baudach's message of October 30, 2014 9:36: > > Dear developers, > > = > > To use sup for composing emails following "mailto://" links in HTML > > documents, sup should enter compose mode when called with an email > > adress as command line argument like this: > > = > > sup supmua@googlegroups.com > > = > > This could be achieved adding the following line of code after > > the option definitions in bin/sup: > > = > > ---------------->%---------------------------- > > $opts =3D Trollop::options do > > version "sup v#{Redwood::VERSION}" > > banner < > Sup is a curses-based email client. > > = > > Usage: > > sup [options] > > = > > Options are: > > EOS > > opt :list_hooks, "List all hooks and descriptions, and quit." > > opt :no_threads, "Turn off threading. Helps with debugging. (Necess= arily disables background polling for new messages.)" > > opt :no_initial_poll, "Don't poll for new messages when starting." > > opt :search, "Search for this query upon startup", :type =3D> Strin= g > > opt :compose, "Compose message to this recipient upon startup", :ty= pe =3D> String > > opt :subject, "When composing, use this subject", :type =3D> String= , :short =3D> "j" > > end > > = > >>>> ## compose message if we have an email address as first command li= ne argument > >>>> $opts[:compose] =3D ARGV[0] if ARGV[0] =3D~ /.+@.+\..+/ && !$opts[= :compose] > > ---------------->%---------------------------- > = > That is fine by me, but perhaps you can use trollop? Otherwise I don't > think this possibility will be contained in --help. Also, this requires= > updating the man pages. > = > I think it would be better with a stricter check, perhaps RMail can hel= p > out. > = > - gaute > = Well, I digged through all documentation of trollop short of reading the = source code, and did not find any possibility to access the command line arguments other than with ARGV. Trollop removes the parsed options from ARGV, so that after parsing ARGV contains only the non-option arguments t= o the command invocation. If there is a more trollopish way to get at the commandline, I'm glad to learn. As to a stricter check, I dig into Rmail when I've got the time. In the meantime I'll use a wrapper, as documented in the wiki. Regards, Ruthard -- = Emails bitte verschl=C3=BCsseln und signieren. Meine PGP-Id: AC5AC6C2 --=-1414659436-871081-2517-9172-1-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJUUf1sAAoJEA852hysWsbCLJIH/2BLD4BBBJspQuo7ChjoFd9e 3caqFIA5XzQiq/WuYhZc/QYbow5j/6Yhy3YZAXt9VR+b1JAgMguo7mFTXA304Bql FpPhFZGZypZydUac3x/KOwAj2mMpumTOAliTATw1HFpdF09fd0F1dIXi58ynltsj DubutDHQFHc7Q7/duhfeD3Ydms8imhceBTpjhTBZyWdtImsjDvXA5JZTOLKkEy72 aJ7tbwsPwFBCVO4dEYQC9a/g92Tl1xxbREC2Ww+5lWtYSjQQH1KtKJZ4jbSFqg5a NS7boblupBl5ScrAaT4ZSp4dZHt1Z/AWcY+G5lyaI+haFnuNBttx+73RoVOV2gY= =c7js -----END PGP SIGNATURE----- --=-1414659436-871081-2517-9172-1-=--