Replies: 2 comments 4 replies
-
@kietfsek Thanks for coming up with a solution. I personally find quoting in Windows to be quite unintuitive. What is even worse is that some of the examples that does not work in lfrc (e.g. quoting the entire path) does seem to work in regular |
Beta Was this translation helpful? Give feedback.
-
We now have a proposed PR #1309 that is likely to change this behavior in future versions of lf, hopefully for the better. Feel free to test it out. |
Beta Was this translation helpful? Give feedback.
-
Hi,
You can jump to TLDR to save time.
background
I wanted to share my experience. I was trying to adding a new command for lf on Windows and encountered a problem.
I went through issues, discussions, Wiki, documentation of this repository. I also Googled and checked Reddit, and couldn't find the answer. I was writing a new thread in this discussions forum to ask, when I accidentally find a way to make it work.
Since I think the problem I encountered was not documented somewhere on the net (or at least it's not easy to find), hence I wanted to share it here.
the problem
When making a command for Windows platform, if the path of the executable doesn't contain a space character, or that no file is passed to the executable (as a command line argument), it's easier to make it work. For example, the following two commands work:
On the contrary, it takes special care to make it work. For example, the following doesn't work:
I tried a lot of combinations, including the followings, and I only find one way to make it work, it's the one marked out:
Notice the point is not to quote the entire path, but a small part. In other words:
Maybe it's the supposed way, by design or maybe it's not the best way, I don't know.
If anyone has better way or more information, feel welcomed to share.
TLDR
This is a way that I find working (quote only "Program Files", not entire path):
Beta Was this translation helpful? Give feedback.
All reactions