-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File names with spaces cannot be opened #12
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
Problem with other characters are solved by one command:
However problem with spaces is somewhat complicated. It's not about escaping but about parsing. With the presence of links, I cannot come up with a good method to parse filename from a line. Currently I take the specified column as filename from the file list. As you can see, it cannot deal with filename with spaces. But neither can I take from the specified column to the last because a link is shown as below:
I cannot split filename by I'll look into this, but it may take time. |
No problem for the time. I open the issues that I find to be useful to your project. I can live with this particular problem.
In that case the whole line would not start with |
Yeah I know this. But if there is a link file named "foo -> bar"... This may be a minor problem, but I think there should be some clean way to solve this kind of problem. |
|
Right, but that's beyond my skills. |
Actually I used the |
I thought about the problem, and splitting on the (last) Indeed Meanwhile IF the user prefers So here is the reasonment for non-quoted handling: If the If the target is outside the current dir, then it would be either an absolute path starting with So the only case that would fail with exa is when the target name contain a In conclusion the issue would be extremely unlikely to happen, so I think it's fair ignoring it from development efforts (at east for now), and reporting it as a known issue very unlikely to happen. Accepting it as an known issue, and implementing a different strategy to handle the non-quoted exa strings would at least solve the not-so-unlikely issue with all the files that contain a space. What do you think? |
Yeah, parsing in a hard way may work, as you say. But I'm thinking if there a better way to map selected line to file name.
|
that looks like very inefficient and kind of hacky, besides being misaligned I can live without the space parsing if that is too difficult, especially because it's a choice: if I want exa I know that's the limit. It's fine. I don't think that small problem is worth all that work and hacking, but it's up to you of course. |
Another hacky option would be parsig the code colors, since exa colors link and target different. Of course it would not work in absence of color. |
Yeah, you're right. Finally I remain the corner case there. Fixed with parsing " -> " for links. |
It works well! Thank you!!! |
It's actually better than that. This works no problem:
But this does not, even using
I see that you do the same thing both for ls and for exa. I guess to keep the code simple... which considering the low possibility of this happening is more than fine. Before you solved it I was experimenting with inode, that would work for everything no matter ls or exa, but it is terribly slow using it with find. I may play a bit with it and if I get something fast and reliable I may try a PR. Thank you for your time on this plugin. It's REALLY great! |
Yes, I had misunderstood the mechanism of
Yes, it is non-trivial to deal with quotes, escaping, and any other special cases in shell scripts. So I just make |
same as #10 but with spaces. I suspect there might be other characters that need to be escaped.
The text was updated successfully, but these errors were encountered: