Skip to content
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

Add xonsh command syntax to work with xonsh as the default shell #32

Closed
wants to merge 5 commits into from

Conversation

eugenesvk
Copy link

I've added a new Python command syntax that can be understood by the Python-based xonsh shell, which is required when xonsh is used as the default shell since it chokes on the current sh-based syntax:

  • via a -p/--python command line argument (but then this breaks other default shells, so inconvenient if you switch default shells)
  • via an auto-detection feature (which runs a grep "^$(id -un)": /etc/passwd to get the default shell before launching the relevant command) — I've copied your main process creation code and just removed the parts that weren't needed (sockets etc.), so it's a bit of a code duplication

For the new syntax I bypassed the appendWslArg function as there is no need to escape the quotes, and I don't understand how relevant the other corrections are (and how to adjust them properly for the new syntax) :)

Only tested this with ConEmu and msys2

Fixes: #31

@Biswa96
Copy link
Owner

Biswa96 commented Nov 22, 2023

Thank you for submitting your pull request. I appreciate your contribution and the time you have invested in making this change. However, I am not currently interested in implementing this change. I apologize for any inconvenience this may cause.

@Biswa96 Biswa96 closed this Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xonsh default shell doesn't accept sh syntax
2 participants