mu: implement new command-line parser
Implement a new command-line parser, based on CLI11. It's a bit more C++'ish, and allows for a lot of fancy things... some of which we have implemented here. Update the various commands to use the new Options struct Remove the old help strings; instead e.g. `mu help view` opens the manpage. Integrate the guile scripts more tightly.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
## Copyright (C) 2021 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||
## Copyright (C) 2021-2022 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
@ -14,15 +14,10 @@
|
||||
## along with this program; if not, write to the Free Software Foundation,
|
||||
## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
awk_script=join_paths(meson.current_source_dir(), 'mu-help-strings.awk')
|
||||
mu_help_strings_h=custom_target('mu_help',
|
||||
input: 'mu-help-strings.txt',
|
||||
output: 'mu-help-strings.inc',
|
||||
command: [awk, '-f', awk_script, '@INPUT@'],
|
||||
capture: true)
|
||||
mu = executable(
|
||||
'mu', [
|
||||
'mu.cc',
|
||||
'mu-options.cc',
|
||||
'mu-cmd-cfind.cc',
|
||||
'mu-cmd-extract.cc',
|
||||
'mu-cmd-fields.cc',
|
||||
@ -30,11 +25,7 @@ mu = executable(
|
||||
'mu-cmd-index.cc',
|
||||
'mu-cmd-script.cc',
|
||||
'mu-cmd-server.cc',
|
||||
'mu-cmd.cc',
|
||||
'mu-cmd.hh',
|
||||
'mu-config.cc',
|
||||
'mu-config.hh',
|
||||
mu_help_strings_h
|
||||
'mu-cmd.cc'
|
||||
],
|
||||
dependencies: [ glib_dep, gmime_dep, lib_mu_dep, thread_dep, config_h_dep ],
|
||||
cpp_args: ['-DMU_SCRIPTS_DIR="'+ join_paths(datadir, 'mu', 'scripts') + '"'],
|
||||
|
||||
Reference in New Issue
Block a user