-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Problem using eln with file names containing spaces with xonsh #244
Comments
It actually is a problem with xonsh shell. It would work if eln was expanded using quotes, not slashes. Maybe I will just stop using xonsh inside clifm, and switch back to bash... |
Hi @tkossak. First, the obvious thing: However, providing an option to choose among these escaping mechanisms (backslash, single, or double quotes) when auto-expanding file names, might be an interesting feature. For the time being, you can still make it work using the
Far from perfect, but it does the trick. |
A little improvement: Btw, there are several open issues in the |
Yes, xonsh does not try to be 100% POSIX compatible, instead it wants to be more PYTHON compatible.
So it's feature request ticket :). If we could configure clifm to use single single (or double) quotes instead of slashes it would be awesome. I would use it even with bash, because slashes look ugly, especially when file name has more spaces and is long - it's difficult to find at first glance where file name ends, and where command arguments are. Thank you very much for your hard work! |
I have been playing around with this (cause I think is a feature to have) and have been able to make it work pretty nice, except for directories: TAB completion/suggestions is complex machinery. The thing is that I don't like to provide a non-complete feature because it looks weak (and it is it), but I could provide you with temporary snapshots hidden behind a non-documented option to make some tests. EDIT: non-complete means that alternative quoting mechanisms (both single and double quotes) will work only for ELN expansions provided they do not point to directories. |
Sure, If you tell me commit hash to install clifm from, I can try it |
The new feature (though highly experimental) is ready. This is how it works:
Needles to say, this feature is completely undocumented (hidden) and might be modified (or even completely removed) in the (near) future. |
Expanding eln works as it should (tried
clifm v1.13.9 with xonsh as $CLIFM_SHELL. In bash both eln and expanded eln works. |
Should be working now. EDIT: A little tip: |
Works, thank you (also for the tip). |
Got another improvement for this feature: it would nice if quoting expansion worked also for tab completion! eg:
Last command is expanded into: |
Hi @tkossak. Yes, I'm totally aware of this, and this is why I said that this feature is not complete. The thing is that I'll bear this in mind however. |
btw. same issue with |
Hi @freijon. Thanks for pointing this out. For the time being, the same trick used for As to the backticks, that's quite unorthodox, and more importantly, dangerous: most shells (following the POSIX specification) use backticks for command substitution : now, if you're not running I'll take a look at it, however. |
Describe the bug
Problem using files containing spaces in their names, when using clifm with xonsh shell.
To Reproduce
Run clifm using
CLIFM_SHELL=/home/kossak/.local/bin/xonsh clifm
(enter proper path to xonsh) and then:I also tried expanding ELN (by entering
vim 4
and hitting tab) but the same error appears:In xonsh
vim a\ -\ a
also returns this error butvim 'a - a'
works. Is it possible to configure eln expansion to use quotes instead of escaping spaces with\
?Expected behavior
After running
vim 4
vim opens the filea - a
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: