Closed 6102bitcoin closed 3 years ago
Yeah entering / editing paths right now is annoying. I believe the right solution for this is something like rustyline but I don't know much about it or how well it would integrate with dialoguer
which we're using right now for all the prompts.
Okay after talking it over here's the plan:
If you want to create a new address factory based on a coldcard-export.json, tell the user to re-run like this address-factory -n coldcard-export.json
. That way the standard shell can help us out with autocomplete and we don't have to bake in a ton of logic to recreate shell functionality.
When a user is entering the path in the wizard they can't use autocompletion or ls to browse to the file. They also can't go back and edit part of the path. For example if the user enters the path as
/home/files/example.json
and the user wants to go back and edit this to be/home/coldcard-files/example.json
they have to delete the string from the trailing end (they can't go left with the cursor).Solution: The fix already made to allow the dragging of files into the terminal helps this immensely. I don't know if there is a better way long term to allow the user to select files using a pop-up file select menu. For terminal users it feels like it's annoying to have to remember a path or use a separate terminal / file explorer to do this.