I like to use the up and down keys to cycle between save and run on the terminal
while developing.
I’ve accidentally scrolled to load instead of save which loads the previously saved
version of my current project in progress. I’ve lost work several times.
It’s an easy mistake to make.
Defintely user error and not a bug,
although I’d consider it a UX issue.
I’d like to recommend a Y/N/C prompt in the terminal
for any command that could cause unsaved work on a project
in progress to be lost.
E.G.
>> LOAD MY_PROJECT
>> SAVE
>> RUN
.... (repeat for a long time)
>> LOAD MY_PROJECT
>> CURRENT FILE MY_PROJECT CONTAINS UNSAVED WORK
>> LOADING WILL REVERT TO PREVIOUSLY SAVED VERSION
>> AND WORK WILL BE LOST
>> ARE YOU SURE YOU WANT TO LOAD?
>> (Y - YES , N - NO , C - CANCEL)
Did you check the backup folder? It saves backups of unsaved changes in certain scenarios (it displays a message at the bottom of the screen when it does that)...I thought it did whenever you load a new cart when the current cart has unsaved changes, but maybe that case is not covered?
I think only one previous backup is saved at any given time or something like that, but if you act on it right away, you can still recover from a mistake like that.
Thanks. Yes. I was able to get it out of the backup folder since I acted quickly. Thanks for the reminder. I am grateful for that feature.
I've certainly made this mistake before.
My recommendation is to use Ctrl+S and Ctrl+R to save and run. More convenient (you can save/run directly from the editor) and not vulnerable to this mistake. Ctrl+R running will also reload external changes to carts or warn if you have unsaved changes internally with changes externally.
[Please log in to post a comment]