diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2014-03-21 16:16:33 +0000 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2014-03-21 16:16:33 +0000 |
commit | 0298a258a4d5967a14699ddc78f3229fbff2aa8e (patch) | |
tree | c6befdabaafc2834cff54c9df8cdb0e0d424c0eb /alot | |
parent | 9eae8da069d09454296df90917867008ec4fc81b (diff) |
interpret mailto and other parms to initial 'compose' separately
Diffstat (limited to 'alot')
-rwxr-xr-x | alot/init.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/alot/init.py b/alot/init.py index 45ae1590..5f8780ec 100755 --- a/alot/init.py +++ b/alot/init.py @@ -43,6 +43,7 @@ class ComposeOptions(SubcommandOptions): optParameters = [ ['sender', '', None, 'From line'], ['subject', '', None, 'subject line'], + ['to', [], None, 'recipients'], ['cc', '', None, 'copy to'], ['bcc', '', None, 'blind copy to'], ['template', '', None, 'path to template file'], @@ -54,7 +55,7 @@ class ComposeOptions(SubcommandOptions): def parseArgs(self, *args): SubcommandOptions.parseArgs(self, *args) - self['to'] = ' '.join(args) or None + self.rest = ' '.join(args) or None class SearchOptions(SubcommandOptions): @@ -176,6 +177,8 @@ def main(): cmd = commands.commandfactory(cmdstring, 'global') elif args.subCommand == 'compose': cmdstring = 'compose %s' % args.subOptions.as_argparse_opts() + if args.subOptions.rest is not None: + cmdstring += ' ' + args.subOptions.rest cmd = commands.commandfactory(cmdstring, 'global') else: default_commandline = settings.get('initial_command') |