Commit Graph

5 Commits

Author SHA1 Message Date
Xavier Delaruelle
cfe0657bc9 Fix mod subcmd abbrev match
Fix module sub-command abbreviation match to ensure passed abbreviated
form fully match sub-command, not only its minimal abbreviated form. As
an example, ``lod`` or ``loda`` do not match anymore the ``load``
sub-command, ``lo`` or ``loa`` still do.
2020-01-09 20:39:21 +01:00
Xavier Delaruelle
a9f82d7dd3 testsuite: set type help message as global var 2017-12-15 06:35:18 +01:00
Xavier Delaruelle
78ccc9e8f5 testsuite: refactor ALL shell tests
Adapt test* procedure to call test for each supported shell when
test_shell argument is set to 'ALL'.

Transform all tests set for all shells with a common output to use this
new 'ALL' test_shell argument.
2017-08-02 17:27:45 +02:00
Xavier Delaruelle
66564cff9a testsuite: refactor shell OK and ERR code
Pass 'OK' or 'ERR' string to test procedure, then these procedures will
use the new internal 'shell_ok' and 'shell_err' procedures to translate
these bare OK/ERR strings in the appropriate code for the given shell.
2017-08-02 17:26:52 +02:00
Xavier Delaruelle
e916ec23d3 Merge main command handling in module proc
Make module command handling appear in a single location, the module
procedure, rather than having a duplication of code in the main section.

This modification simplifies the addition of new commands or the
adaptation of existing commands as everything has to be done only once.

Now calling module from a modulefile or a modulerc benefits from the
same command shortcuts than when it is called from the command line.

Moreover do not print anymore the module usage message when an invalid
command is typed, as this large message often hide the error printed on
the first line. An advice to type "module --help" is printed instead.
2016-09-06 10:46:52 -05:00