Closed zerans closed 6 years ago
click-repl only works if you have a command Group
: What is the point of using it if there are no commands to execute on the shell?
Same as the other guy's issue. I don't want $ thing repl
, I want $ thing
to always drop to the REPL immediately. I think maybe click-repl is not the right library for me.
On May 9, 2018, at 11:03 AM, Markus Unterwaditzer notifications@github.com wrote:
click-repl only works if you have a command Group: What is the point of using it if there are no commands to execute on the shell?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/click-contrib/click-repl/issues/40#issuecomment-387825207, or mute the thread https://github.com/notifications/unsubscribe-auth/AZ7bltOJPYn9sh_GdOT5oXdzpMVLoMz9ks5twy-KgaJpZM4T3rtx.
That is not what I am talking about. I mean that if you have only one command, what would the repl allow you to do?
For my usecase I have a command like this:
my_program # launches repl
my_program foo # a subcommand
You on the other hand seem to have no subcommands, because you have no group. What exactly would the user type in the REPL?
There were other commands not included in the example, sorry. I think I'm misunderstanding how to achieve the goal of having the program drop straight into the REPL without requiring a repl
arg. A group with invoke_without_command
?
yes, invoke_without_command
, and in the group body:
if not click_ctx.invoked_subcommand: repl(...)
Thank you :)
On May 9, 2018, at 11:39 AM, Markus Unterwaditzer notifications@github.com wrote:
yes, invoke_without_command, and in the group body:
if not click_ctx.invoked_subcommand: repl(...)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/click-contrib/click-repl/issues/40#issuecomment-387835880, or mute the thread https://github.com/notifications/unsubscribe-auth/AZ7blrb9dwBURLkdGQG-bHRlkTdTsylgks5twzfxgaJpZM4T3rtx.
yw
In a function called from a setup tools entry point:
I get this error:
If I do this:
I get a different error, because
pop
is called incorrectly.Commenting out lines 171-180 fixes the error.
available_commands
isn't used anywhere else, so this seems to be dead code?