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.112.50.243 with SMTP id f19mr1627915lbo.1.1416136631354; Sun, 16 Nov 2014 03:17:11 -0800 (PST) X-BeenThere: supmua@googlegroups.com Received: by 10.152.170.227 with SMTP id ap3ls1057007lac.60.gmail; Sun, 16 Nov 2014 03:17:10 -0800 (PST) X-Received: by 10.152.8.67 with SMTP id p3mr3018899laa.4.1416136630856; Sun, 16 Nov 2014 03:17:10 -0800 (PST) Return-Path: Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by gmr-mx.google.com with ESMTPS id sg7si1695523lbb.1.2014.11.16.03.17.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 16 Nov 2014 03:17:10 -0800 (PST) Received-SPF: none (google.com: eg@gaute.vetsj.com does not designate permitted sender hosts) client-ip=209.85.217.177; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: eg@gaute.vetsj.com does not designate permitted sender hosts) smtp.mail=eg@gaute.vetsj.com Received: by mail-lb0-f177.google.com with SMTP id z12so7812641lbi.22 for ; Sun, 16 Nov 2014 03:17:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :user-agent:message-id:mime-version:content-type :content-transfer-encoding; bh=vSl5LSCrRE6iEcqqU1aJtnfEg0WOO6Q5lZazortpqgc=; b=CrIUll304hsBAtgDDZgy6HpjKZ5aMaA9gwt1dcFIJZxx6Dd2Ugq2JTC2C355Bheojh bpjYpDflw8KirY13a/Qji9CWLlskSmYe0KSe5p+sKwRItxixbi+C0rFwUHsjNYVT15wV /Zd05c/EB5LrXLR/j0beSqEMALsZ0FSoNy3r2Hsz3kY/Wj9YR2kM/SQt7dASlnTf8x3A w7nPsliiKomH1Tqb7ZAp4ZBXHK8rBi+Nsime4xHofpf0/OyzSXOLf96GXFiaIYawGR4Z WbtA3FbG9ZIrflaop75NJkbtvXzxUhIBH3FGSwQ1EyMhFB41/rAe04GTwDkzDOQaiJXg x0fg== X-Gm-Message-State: ALoCoQlBkSstGPSc8a017SSNieM3d+E/QmQOON2BaVb/yrcVmOp4cmJ+qeQrdH9mUjJRoA6ygrLc X-Received: by 10.112.144.228 with SMTP id sp4mr19062515lbb.58.1416136630112; Sun, 16 Nov 2014 03:17:10 -0800 (PST) Return-Path: Received: from localhost (c2774BF51.dhcp.as2116.net. [81.191.116.39]) by mx.google.com with ESMTPSA id lk8sm9516225lac.16.2014.11.16.03.17.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Nov 2014 03:17:09 -0800 (PST) Date: Sun, 16 Nov 2014 11:17:17 +0000 From: Gaute Hope Subject: Re: [sup] [PATCH] added command line argument to sup invocation: "sup email-address" invokes sup in command line To: Ruthard Baudach Cc: supmua References: <1415471780-sup-1914@ruthard-lappi> <1415959463-astroid-0-4xu4dq0h0g-7223@strange> <1416000203-sup-9655@ruthard-lappi> In-Reply-To: <1416000203-sup-9655@ruthard-lappi> User-Agent: astroid/v18cf4a3b (https://github.com/gauteh/astroid) Message-Id: <1416136614-astroid-1-p7569roxe1-1329@strange> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Excerpts from Ruthard Baudach's message of November 14, 2014 22:48: >>=3D=3D Ausz=C3=BCge aus der Nachricht von Gaute Hope vom 2014-11-14 11:1= 3: >> 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]. >=20 > I still have to master this "stupid content tracker". Hope to figure it > out. >=20 >> > Sup is a curses-based email client. >> > =20 >> > Usage: >> > - sup [options] >> > + sup [options] [to-address] >> > + >> > +Arguments: >> > + to-address: Compose message to this recipient upon star= tup >> > + --compose overrides an address passed as ar= gument >>=20 >> ^^ i think it would be better to fail if --compose is specified in addit= ion to >> an unnamed argument, what happens if i want to specify many addresses? >> what do you think? >=20 > 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, >=20 > sup --compose "This is all a terrible nonsense" >=20 > will happily compose an email with a "To: This is all a terrible > nonsense" header. >=20 > 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 >=20 > This way the option --compose and any command arguments would work > seamlessly together. >=20 > What do you think? >=20 >> > =20 >> > +## Trollop does no command argument parsing, only option parsing. >> > +# After Trollop parsing, ARGV contains only the +rest+ of the command= line, >> > +# thus the arguments to our program >> > +## compose message if we have an email address as first command line = argument >>=20 >> add '.' > sorry, yes >> , why different levels of '#' ?=20 > 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. All sounds good. - gaute =