-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
What about leading and trailing whitespace around the $() operator? #2
Comments
Hi @laloch! Thank you for the great question!
At this time in xonsh 0.9.24 this example is not working and I've tested the echo 123@('456')
#123456
echo 123@(['456','789'])
# 123456 123789 Python substitution operator expands the prefix and duplicate it. This behavior looks good IMHO. What about If we install xep-2 fork and try the similar example we can found that XEP-2 logic improves the behavior comparing with current xonsh: mkdir -p /tmp/dir_test && cd /tmp/dir_test
# xonsh
mkdir -p here/@($(whoami))/garbage
tree here
#here
#└── pc\012
# └── garbage
# 🔴 Unwanted 'pc'$'\n' directory. # xonsh-xep-2
# pip install -U git+https://github.com/anki-code/xonsh-xep-2
rm -rf here
mkdir -p here/@($(whoami))/garbage
tree here
#here
#└── pc
# └── garbage
# 🟢 Everything as expected. As result my answer at this time will be: Does it make sense? |
Maybe this should be part of the XEP? (make |
Yeah, I think it will be good. |
The original question from laloch:
The text was updated successfully, but these errors were encountered: