anki-code / xonsh-install

Best way to install xonsh on Linux or macOS and using it as core shell.
BSD 2-Clause "Simplified" License
14 stars 0 forks source link

The way to pin/unpin xonsh executable to prevent/allow xonsh shadowing #3

Open anki-code opened 4 months ago

anki-code commented 4 months ago

I noticed:

xonsh # xonsh-installed xonsh
which xonsh
# .../xonsh-env/xbin/xonsh

xmamba activate myenv  # has xonsh
pip install xonsh
which xonsh
# .../myenv/.../bin/xonsh
# Because:
$PATH
# ['.../myenv/...', '.../xonsh-env/...']

echo '#!/usr/bin/env xonsh' > script.xsh
./script.xsh  # .../myenv/.../bin/xonsh

We need to have a way to pin the xonsh executable.

anki-code commented 4 months ago

https://github.com/xonsh/xonsh/issues/5603