Skip to content

How to run any .xsh script without preceding xonsh? #4475

Answered by hamad12a
hamad12a asked this question in Q&A
Discussion options

You must be logged in to vote

I figured a solution that implies writing the shebang as follows (I already installed Git and enabled Linux commands during Git installation process),

#!\C:\\Users\\USER\\AppData\\Roaming\\Python\\Python37\\Scripts\\xonsh

As we know shebang is Unix-based syntax but the escape characters should be inverted and doubled because we are using it in the Windows system.
An alternate solution is one should use Git Bash as the default Terminal in VS code then including the shebang command in Untitled.xsh.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by hamad12a
Comment options

You must be logged in to vote
2 replies
@agoose77
Comment options

@halloleo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants