Bug #835
closed
lttng load --list-options and lttng save --list-options incorrectly report an error
Added by Daniel U. Thibault over 10 years ago.
Updated about 10 years ago.
Description
Unlike all other 'lttng <command> --list-options' commands, 'lttng load --list-options' and 'lttng save --list-options' return 'Error: Undefined command' (error code 2) after listing the options. I suspect this will prevent bash commnand completion from operating correctly for those two.
On a related note, 'lttng --list-commands' still lists 'enable-consumer' and 'disable-consumer' as commands. Asking for their list-options returns a 'Warning: Some command(s) went wrong' (error 4). This maybe by design (for retro-compatibility) since the 'create' command still lists the obsolete options 'disable-consumer' and 'no-consumer'.
- Status changed from New to Confirmed
Yeah they are missing indeed.
Also, I just pushed a patch that removes any thing related to enable/disable consumer command that are obsolete for quite some time.
See commit 62e55253348f999a97d323a3b1503478c4f3ff51
Update: After adding manually the load and save commands to /etc/bash_completion.d/lttng, I get the following behaviour:
$ lttng load --h
(I now hit TAB)
$ lttng load --husage: lttng load [OPTIONS] [SESSION]
Options:
-h, --help Show this help
[...]
before creating new one(s).
Error: Undefined command
(And the command line is till "live", awaiting an ENTER...)
This is because the load and save commands don't yet implement the --list-options query.
- Status changed from Confirmed to Resolved
- % Done changed from 0 to 100
Applied in changeset tools|commit:13a810d5e44e4e8e5ce4c1a36456cd0e394d36c2.
Also available in: Atom
PDF