diff options
author | Ruben Pollan <meskio@sindominio.net> | 2011-09-08 03:47:05 +0200 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2011-09-08 10:36:29 +0100 |
commit | 8e04392b47bf50c9aebc587d9308513741771eed (patch) | |
tree | 752d51aafe55b8f9604c081eabb4f723bed1c32a /alot/init.py | |
parent | bff20ceb581ebaf820d058e90e0d7a8c19d51502 (diff) |
Add config option for initial searchstring
New option for the alot.rc initial_searchstring where can be defined the
default search string when alot is opend without params.
Diffstat (limited to 'alot/init.py')
-rwxr-xr-x | alot/init.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/alot/init.py b/alot/init.py index e5a13a5b..9972e42f 100755 --- a/alot/init.py +++ b/alot/init.py @@ -52,7 +52,7 @@ def parse_args(): default='/dev/null', help='logfile') parser.add_argument('query', nargs='?', - default='tag:inbox AND NOT tag:killed', + default='', help='initial searchstring') return parser.parse_args() @@ -87,11 +87,16 @@ def main(): command_map['enter'] = 'select' command_map['esc'] = 'cancel' + # get initial searchstring + query = settings.config.get('general','initial_searchstring') + if args.query != '': + query = args.query + # set up and start interface ui = UI(dbman, logger, aman, - args.query, + query, args.colours, ) |