diff options
Diffstat (limited to 'Master/texmf-dist/scripts/texdoc/config.tlu')
-rw-r--r-- | Master/texmf-dist/scripts/texdoc/config.tlu | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/texdoc/config.tlu b/Master/texmf-dist/scripts/texdoc/config.tlu index e7a7c369e4f..42d2e779055 100644 --- a/Master/texmf-dist/scripts/texdoc/config.tlu +++ b/Master/texmf-dist/scripts/texdoc/config.tlu @@ -1,4 +1,4 @@ --- $Id: config.tlu 6 2017-05-11 15:43:32Z karl $ +-- $Id: config.tlu 16 2017-10-26 22:28:24Z karl $ -- config.tlu: configuration handling for texdoc -- -- Manuel Pégourié-Gonnard, GPLv3+, see texdoclib.tlu for details @@ -132,13 +132,24 @@ end -- and set a default value in setup_config_from_defaults() if relevant. function setup_config_from_cl(arg) local curr_arg + local action = true local function set_config_elt(key, val) set_config_element(key, val, {src='cl', name=curr_arg}) end while arg[1] and string.match(arg[1],'^%-') do curr_arg = table.remove(arg,1) + + -- action + if (curr_arg == '-h') or (curr_arg == '--help') then + action = 'help' + elseif (curr_arg == '-V') or (curr_arg == '--version') then + action = 'version' + elseif (curr_arg == '-f') or (curr_arg == '--files') then + action = 'files' + elseif curr_arg == '--just-view' then + action = 'view' -- mode - if (curr_arg == '-w') or (curr_arg == '--view') then + elseif (curr_arg == '-w') or (curr_arg == '--view') then set_config_elt('mode', 'view') elseif (curr_arg == '-m') or (curr_arg == '--mixed') then set_config_elt('mode', 'mixed') @@ -175,7 +186,7 @@ function setup_config_from_cl(arg) return false end end - return true + return action end ------------------------- config from environment -------------------------- |