* calling sup with email address as argument
@ 2014-10-30 8:36 Ruthard Baudach
2014-10-30 8:43 ` [sup] " Gaute Hope
0 siblings, 1 reply; 3+ messages in thread
From: Ruthard Baudach @ 2014-10-30 8:36 UTC (permalink / raw)
To: supmua
[-- Attachment #1: Type: text/plain, Size: 1491 bytes --]
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 = Trollop::options do
version "sup v#{Redwood::VERSION}"
banner <<EOS
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. (Necessarily 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 => String
opt :compose, "Compose message to this recipient upon startup", :type => String
opt :subject, "When composing, use this subject", :type => String, :short => "j"
end
>>> ## compose message if we have an email address as first command line argument
>>> $opts[:compose] = ARGV[0] if ARGV[0] =~ /.+@.+\..+/ && !$opts[:compose]
---------------->%----------------------------
I'm sorry for not using git-format-patch, I don't know neither ruby nor
git, and am trying to learn ruby at the moment.
Best regards,
Ruthard
----
Emails bitte verschlüsseln und signieren.
Meine PGP-Id: AC5AC6C2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [sup] calling sup with email address as argument
2014-10-30 8:36 calling sup with email address as argument Ruthard Baudach
@ 2014-10-30 8:43 ` Gaute Hope
2014-10-30 8:57 ` Ruthard Baudach
0 siblings, 1 reply; 3+ messages in thread
From: Gaute Hope @ 2014-10-30 8:43 UTC (permalink / raw)
To: supmua, Ruthard Baudach
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 = Trollop::options do
> version "sup v#{Redwood::VERSION}"
> banner <<EOS
> 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. (Necessarily 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 => String
> opt :compose, "Compose message to this recipient upon startup", :type => String
> opt :subject, "When composing, use this subject", :type => String, :short => "j"
> end
>
>>>> ## compose message if we have an email address as first command line argument
>>>> $opts[:compose] = ARGV[0] if ARGV[0] =~ /.+@.+\..+/ && !$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 help
out.
- gaute
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [sup] calling sup with email address as argument
2014-10-30 8:43 ` [sup] " Gaute Hope
@ 2014-10-30 8:57 ` Ruthard Baudach
0 siblings, 0 replies; 3+ messages in thread
From: Ruthard Baudach @ 2014-10-30 8:57 UTC (permalink / raw)
To: supmua
[-- Attachment #1: Type: text/plain, Size: 2453 bytes --]
>== Auszüge 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 = Trollop::options do
> > version "sup v#{Redwood::VERSION}"
> > banner <<EOS
> > 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. (Necessarily 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 => String
> > opt :compose, "Compose message to this recipient upon startup", :type => String
> > opt :subject, "When composing, use this subject", :type => String, :short => "j"
> > end
> >
> >>>> ## compose message if we have an email address as first command line argument
> >>>> $opts[:compose] = ARGV[0] if ARGV[0] =~ /.+@.+\..+/ && !$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 help
> 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 to 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üsseln und signieren.
Meine PGP-Id: AC5AC6C2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-30 8:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-30 8:36 calling sup with email address as argument Ruthard Baudach
2014-10-30 8:43 ` [sup] " Gaute Hope
2014-10-30 8:57 ` Ruthard Baudach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox