-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Xonsh throws exceptions on initialization only when carapace is added to the run control #1068
Comments
Looks like the detection isn't working. It's a simple check using the parent process names. Do you still get the exceptions with: # ~/.config/xonsh/rc.xsh
exec($(carapace _carapace xonsh)) |
Nope, that works as expected. 👍 That's good enough for me. Thank you (and thanks for making carapace, et al.). |
A little more information that may be relevant: I used xonsh-install to set up my environment. It turns out that xonsh-install uses a Bash wrapper to launch Xonsh (see anki-code/xonsh-install #4 and other discussion it links back to). I don't use Xonsh as a login shell — rather, I set up a profile in my terminal emulator to launch the shell command directly. That uses I don't know how carapace tries to detect the shell it's in, but it seems reasonable to suspect that the extra turtles in the stack might be getting in its way a bit. |
It just checks the parent process names one by one until it finds one that fits (see here). Nothing fancy, but usually does the job quite fine. |
Probably looks similar to this for you as well?: root@4f709ae6730a / @# ps -fo command
COMMAND
bash
bash
\_ /bin/bash -i /root/.local/xonsh-env/xbin/xonsh
\_ /root/.local/xonsh-env/bin/python /root/.local/xonsh-env/bin/xonsh
\_ ps -fo command |
Yep, that's the stack of turtles this one puts together. 😆 |
Current Behavior
After adding
exec($(carapace _carapace))
to~/.config/xonsh/rc.xsh
, Xonsh throws exceptions on initialization (examples with minimal traceback below). Happy to bring more detail if needed.Expected Behavior
Xonsh should initialize without exceptions when carapace is added to the run control.
Steps To Reproduce
To try and track down what was happening, I added echo statements —
this is <whatever the file is>
— to the top of my Bash and Zsh run control files. My login shell is Zsh, but I do not use it — there's nothing in the run control file except the echo. All the examples below are run from iTerm2 profiles dedicated to the shell indicated.Examples with Bash, Zsh, and Elvish run control files available:
From Xonsh:
From Zsh:
Examples without Bash, Zsh, and Elvish run control files available:
From Xonsh:
From Zsh:*
Version
No response
OS
Shell
Anything else?
No response
Polar
The text was updated successfully, but these errors were encountered: