Closed fake-name closed 7 years ago
Thanks for reporting this bug, i'll have a look into it.
It's definitely a pretty silly problem, but I figure it might be exposing a potential issue internally somewhere.
Yes, you are right regarding the potential issue but there could always be the case that you have a -
in your filename, eg. as leading character, which currently doesn't work either. With fixing the bug you found i also want to implement the possibility to use --
(double-dash) to end argument parsing, to make it possible to eg. open the file -foo
by running
rmate -- -foo
I have created a test-branch https://github.com/aurora/rmate/tree/issue-57 ... can you try if this works for your case? It now seems to handle stuff like "test ->.txt", etc. just fine ...
I think this should work now @fake-name . The problem turned out to be the whitespaces in your filename which i didn't handle properly in a part of the script. Tried with your simplified test-case and also with the long (somehow obscure) filename you mentioned in your first post.
Cool, thanks.
I wound up rewriting some of my stuff to not use angle brackets, so I kind of worked around the issue. They break on windows anyways, so it was kind of silly. I was basically embedding json in a filename because I haven't set up a proper database for a project, yet.
I have a remote file named
img 1497837265 - ['Chip-ID' -> 'ESP8266-1175d8', 'Voltage-In' -> '785.00'].jpg
. (Sublime text can view images, so it's convenient to check images using rmate).Attempting to open this file via
rmate
fails:This is trying to either use double-quotes around the entire filename, or the shell's (bash, in my case) automatically escaped filename.
Both these filenames are correct:
Something being done to the filename inside the rmate script is broken by this string, somehow.
The minimal case of this issue is