diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/msec/man.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/msec/man.py b/src/msec/man.py index d00838a..adffae6 100755 --- a/src/msec/man.py +++ b/src/msec/man.py @@ -268,8 +268,18 @@ msec = MSEC(log) print header -for variable in config.SETTINGS: - callback, params = config.SETTINGS[variable] +# sorting settings according to plugin +callbacks = [] +settings_rev = {} +for entry in config.SETTINGS.keys(): + callback, params = config.SETTINGS[entry] + callbacks.append(callback) + settings_rev[callback] = (entry, params) +callbacks.sort() + +# generating man in correct order +for callback in callbacks: + variable, params = settings_rev[callback] func = msec.get_action(callback) if func: print function_str % (callback, func.__doc__.strip(), variable, ", ".join(params)) |