From: Gaute Hope <eg@gaute.vetsj.com>
To: supmua <supmua@googlegroups.com>,
Ruthard Baudach <ruthard.baudach@web.de>
Subject: Re: [sup] [PATCH] added command line argument to sup invocation: "sup email-address" invokes sup in command line
Date: Fri, 14 Nov 2014 10:13:10 +0000 [thread overview]
Message-ID: <1415959463-astroid-0-4xu4dq0h0g-7223@strange> (raw)
In-Reply-To: <1415471780-sup-1914@ruthard-lappi>
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].
- gaute
Excerpts from Ruthard Baudach's message of November 8, 2014 19:37:
> ---
> History.txt | 5 +++++
> bin/sup | 15 ++++++++++++++-
> 2 files changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/History.txt b/History.txt
> index 27ff788..a59ee50 100644
> --- a/History.txt
> +++ b/History.txt
> @@ -1,5 +1,10 @@
> ==
>
> +* add email command line argument to sup. sup mail.address@isp.tld
> + is now equal to sup --compose mail.address@isp.tld
> +
> +==
^^ drop '==' here, move the history line below previous news, the '==' is
there because I don't know the date/version number of the next release
yet, so it is a placeholder for the next header.
> +
> * You can now unsubscribe from mailinglists using an url, if you have
> a goto-hook setup (Timon Vonk).
>
> diff --git a/bin/sup b/bin/sup
> index 6757312..fba3ea6 100755
> --- a/bin/sup
> +++ b/bin/sup
> @@ -34,7 +34,11 @@ $opts = Trollop::options do
> Sup is a curses-based email client.
>
> Usage:
> - sup [options]
> + sup [options] [to-address]
> +
> +Arguments:
> + to-address: Compose message to this recipient upon startup
> + --compose overrides an address passed as argument
^^ i think it would be better to fail if --compose is specified in addition to
an unnamed argument, what happens if i want to specify many addresses?
what do you think?
>
> Options are:
> EOS
> @@ -46,8 +50,17 @@ EOS
> opt :subject, "When composing, use this subject", :type => String, :short => "j"
> end
>
> +## 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
add '.', why different levels of '#' ? try to stay at approx 80
char width.
> +# I do not use RMail to check the validity of the address, as RMail tends to throw
> +# exceptions I'm too lazy to handle. Ruthard Baudach
^^ drop these lines - i guess we dont need super-strict validation since
this is user input and not stuff received from somebody else.
> +$opts[:compose] = ARGV[0] if ARGV[0] =~ /.+@.+\..{2,}/ and not $opts[:compose]
> +
> Trollop::die :subject, "requires --compose" if $opts[:subject] && !$opts[:compose]
>
> +
^^ drop extra newline
> Redwood::HookManager.register "startup", <<EOS
> Executes at startup
> No variables.
> --
> 2.1.3
>
next prev parent reply other threads:[~2014-11-14 10:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-08 18:37 Ruthard Baudach
2014-11-14 10:13 ` Gaute Hope [this message]
2014-11-14 21:48 ` [sup] " Ruthard Baudach
2014-11-16 11:17 ` Gaute Hope
2014-11-15 9:57 ` Ruthard Baudach
2014-11-16 11:25 ` Gaute Hope
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415959463-astroid-0-4xu4dq0h0g-7223@strange \
--to=eg@gaute.vetsj.com \
--cc=ruthard.baudach@web.de \
--cc=supmua@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox