Closed stdonnelly closed 2 weeks ago
fa0c35a1c6c9bfcfc67a6bf03bc991506afefd2d allows the user to enter 'abort' to stop the operations that get user input. I would prefer listening for SIGINT (Ctrl+C), but it may not be possible to interrupt stdin when using blocking input from stdin.lines()
.
The best way I could find is doing this is to listen for SIGINT using ctrlc, where the listener sets some global "interrupted" flag. Then doing one of the following to deal with stdin:
Multiline notes are supported by starting with a backtick ("`"). Notes can be inputted until the next backtick.
search
is now an alias for read search
. A few other sub-commands were condensed as well
4 Was merged and closed without much testing. There are likely inaccurate prompts and possibly bugs with parts that weren't tested.
Known issues:
read search
is such a common command, it should be replaced with justsearch
. This was discovered when I was updating the database and kept typing justsearch
.create
should have the ability to either go back (probably fairly difficult), or abort. When updating the database, I made typos and had to just exit the program to stop making the incorrect entry. This can possibly be done with a SIGINT listener.