I'm trying to allow users to edit a parameter from a config file using Click. What I would like to do is present them with the previous parameter prefilled in a prompt input so that they can edit it directly, rather than making them type it all out again. For example, if the parameter is 'test.com', I'd like my prompt to present something like this:
Edit Domain Name: testdomain.com
With the testdomain.com being editable. Then when they add a 1 so it reads testdomain1.com, the prompt returns testdomain1.com back to the code. There are a couple other posts from 10 years ago with readline and other more vanilla-python-like options like here and here, but nothing that I can figure out from the Click documentation.
Anyone have any ideas? Thanks!