Comments (7)
Ahh super interesting. Maybe the tab-completion should add the quotes. How do you feel about that?
from xonsh.
Thanks for reporting @jessejoe!
from xonsh.
To me, having the completer add the quotes feels like the right thing. I started working on this, but it looks like it is going to be difficult to get something that feels "right."
That is, it's easy to make the completer add the quotes. But it seems like it will be hard to get it to complete halfway-finished quoted strings (particularly after a space). So if we have a directory called name with spaces
, then it will complete na
or "na
or 'na
, but not "name wi
.
This is maybe fine, but the downside is if we do: tab complete, backspace, tab; then it will not re-complete to the right value.
I will submit a pull request with what I have now in case it helps, but it isn't perfect.
from xonsh.
Cool, It seems like the right thing to do to me would be to insert quotes on both sides, though. I'll check out your PR.
from xonsh.
Adding quotes seems okay, that's what cmd.exe
does in Windows, however it is very annoying when it matches something else, you have to backspace, tab again, possibly backspace again, tab again, etc. This would honestly make it a little too annoying for daily use for me.
from xonsh.
Adding quotes or not seems like the kind of thing that could easily be configure by an environment variable. If you wanted to add that behavior, that would be great!
from xonsh.
I am closing this in favor of #181.
from xonsh.
Related Issues (20)
- Cython debugging does not work with xonsh as login shell
- history errors when using `sudo`
- termios.error after invoking subprocess in pythonanywhere
- Add $RANDOM HOT 3
- Running a command in a subshell re-runs the xonshrc, but only when using redirection
- Inner shell execution (with `$`) triggers an a trailing `\n` that shouldn't be there HOT 1
- xpip fails to correctly install on fedora HOT 12
- General on_pre_spec_run that runs for all commands
- stdin not set in all callable aliases
- Environment tests fail if $UPDATE_OS_ENVIRON = True
- Error `Bad file descriptor` in `prompt_toolkit` on ctrl+C interrupt HOT 17
- Error `Bad file descriptor` in `prompt_toolkit` > 3.0.40 HOT 10
- subprocess call in @events.on_post_rc causes bash to make xonsh background process instead of main process
- AppImage: Input/output error in prompt toolkit HOT 3
- Requires old Sphinx (<5): TypeError: object of type 'LazyObject' has no len() HOT 1
- cd subdir && gives false errors
- ; doesn't split commands inside $()
- Parser fail with numerical and logical AND HOT 3
- A `cmd.bat` in current directory could trick xonsh to run arbitrary code on Windows HOT 7
- FAILED tests/completers/test_bash_completer.py::test_equal_sign_arg[command_context1-completions1-4-False] HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xonsh.