click-contrib / click-repl

Subcommand REPL for click apps
MIT License
215 stars 41 forks source link

add option to change prompt message on the go #23

Closed oridistor closed 7 years ago

oridistor commented 7 years ago

I'm using the tool and it's great! I would like some option to change the prompt message while the repl is already running.

I would consider implementing this by loading from prompt_kwargs every while True loop, allowing the user of click_repl to edit the prompt_kwargs he passed to partial between commands and with it change running objects, if needed.

oridistor commented 7 years ago

Tested this again and as the message is not extracted from prompt_kwargs but just "setdefault" is used, in case prompt_kwargs is supplied as a dictionary, changing the dictionary's message value will change the message. Nice!