aurora / rmate

Remote TextMate 2 implemented as shell script

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File is not stored on disk upon saving in TextMate

besi opened this issue · comments

commented

Hy there I enjoy using rmate a lot.

Actual behaviour

I did run into an issue today:

  1. I want to create a new script

     rmate /home/user/bin/myscript.sh
    
  2. Rmate opens and I merrily edit the script and test code snippets parallel in a bash line by line

  3. I save in TextMate

  4. 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 with mkdir -p /home/user/some/new/folders/that/are/created.
I also do not have a problem with rmate 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:

Screenshot 2024-02-03 at 10 41 28
commented

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!