Open besi opened 6 months ago
I see that rmate
does this already if the user does not have write permission for a file:
File /etc/wpa_supplicant/wpa_supplicant.conf is not writable! Use -f to open anyway.
Hi, thanks for your bug-report - i'll have a look into this!
Hy there I enjoy using
rmate
a lot.Actual behaviour
I did run into an issue today:
I want to create a new script
Rmate opens and I merrily edit the script and test code snippets parallel in a bash line by line
I save in TextMate
I think all went well, until I realise much later that there was actually no file being created in the desired path. I realise my mistake that there was no folder to begin with where rmate could have saved the file in.
My script was quite short, but this behaviour might turn out to be veeery annoying if I would spend hours working on a file, saving every now and then, thinking the file is actually saved on disk and then realising that all my edits go up in a puff of "
/dev/null
smoke".Expected Behaviour
I suggest that
rmate
will abort the process if the folder is not present. There could also be an option like withmkdir -p /home/user/some/new/folders/that/are/created
. I also do not have a problem withrmate
creating folders for me (maybe printing out that it did so).Please note that for example
nano
does a good job warning the user that the folder does not exist: