Commands from files not displaying description
I'm experimenting with the new command features and not having much luck getting the command description to display with --help when using the command():file() function.
Is this a known issue or am I using it wrong? I've tried a couple different things, and haven't gotten it to work.
For what it's worth, I'm seeing the same behavior with the examples/04_commands--git.lua sample.
Hmm, I seem to be able to get the help listing print out for that example though. Can you provide some more context or code please? Here are some invocations I tried which seem to be working fine:
# without any command
lua_cliargs$ lua ./examples/04_commands--git.lua --help
Usage: git
COMMANDS:
diff Show changes between commits, commit and working tree, etc
log
# diff --help
lua_cliargs$ lua ./examples/04_commands--git.lua diff --help
Usage: git diff [OPTIONS] [--] [path-1 [path-2 [...]]]
ARGUMENTS:
path This form is to view the changes you made relative to the
index (staging area for the next commit) (optional)
OPTIONS:
-p, --patch This form is to view the changes you made relative to the
index (staging area for the next commit)
# log --help
lua_cliargs$ lua ./examples/04_commands--git.lua log --help
Usage: git-log [OPTIONS]
OPTIONS:
--[no-]follow Continue listing the history of a file beyond renames
(works only for a single file). (default: off)
Also, --help diff and diff --help seem to be interchangeable.
Indeed, I meant to specify that the "log" command doesn't display the command description like "diff" does. The log command comes from a separate file, while the diff command is defined in the main one.
Perhaps I am misunderstanding that it should display a description at all, but I expected to be able to supply one for the external file and see it show up in the help screen with the commands from the main file.