8/31/2023 0 Comments Xonsh configuration# Setup vox autovox to auto activate for. # Uncomment the below if running from appimage and need python/pip on your path from AppImage # ^C #Traceback (most recent call last): # File "/opt/miniconda3/lib/python3.8/site-packages/xonsh/base_shell.py", line 374, in default # run_compiled_code(code, self.ctx, None, "single") # File "/opt/miniconda3/lib/python3.8/site-packages/xonsh/codecache.py", line 67, in run_compiled_code # func(code, glb, loc) # File "", line 1, in # File "/opt/miniconda3/lib/python3.8/site-packages/xonsh/built_ins.py", line 179, in subproc_captured_inject # o.end() # File "/opt/miniconda3/lib/python3.8/site-packages/xonsh/procs/pipelines.py", line 452, in end # self._end(tee_output=tee_output) # File "/opt/miniconda3/lib/python3.8/site-packages/xonsh/procs/pipelines.py", line 460, in _end # for _ in self.tee_stdout(): # File "/opt/miniconda3/lib/python3.8/site-packages/xonsh/procs/pipelines.py", line 362, in tee_stdout # for line in erraw(): # File "/opt/miniconda3/lib/python3.8/site-packages/xonsh/procs/pipelines.py", line 326, in iterraw # proc.wait() # File "/opt/miniconda3/lib/python3.8/site-packages/xonsh/procs/posix.py", line 434, in wait # rtn = (timeout=timeout) # File "/opt/miniconda3/lib/python3.8/subprocess.py", line 1079, in wait # return self._wait(timeout=timeout) # File "/opt/miniconda3/lib/python3.8/subprocess.py", line 1804, in _wait # (pid, sts) = self._try_wait(0) # File "/opt/miniconda3/lib/python3.8/subprocess.py", line 1762, in _try_wait # (pid, sts) = os.waitpid(self.pid, wait_flags) # File "/opt/miniconda3/lib/python3.8/site-packages/xonsh/procs/posix.py", line 308, in _signal_int # signal.pthread_kill(threading.get_ident(), signal.SIGINT) # File "/opt/miniconda3/lib/python3.8/site-packages/xonsh/procs/posix.py", line 308, in _signal_int # signal.pthread_kill(threading.get_ident(), signal.SIGINT) # File "/opt/miniconda3/lib/python3.8/site-packages/xonsh/procs/posix.py", line 308, in _signal_int # signal.pthread_kill(threading.get_ident(), signal.SIGINT) # File "/opt/miniconda3/lib/python3.8/site-packages/xonsh/procs/posix.py", line 304, in _signal_int # nd_signal(signal.CTRL_C_EVENT if xp.ON_WINDOWS else signum) # File "/opt/miniconda3/lib/python3.8/site-packages/xonsh/procs/posix.py", line 482, in send_signal # rtn = self.proc.# source-bash "echo loading xonsh foreign shell" git branch | fzf | tee -, then fzf's stderr won't be captured and things will work fine (but of course, fixing the code would be preferable!). I've found a good work around is to throw tee on the end, e.g. If one of the fantastic Xonsh devs could weigh in on whether or not this tiny patch is acceptable, that'd be good! I'm happy to write up some tests for it and submit a PR. My other patch is a little more involved and is more of a workaround than a fix, so I'm more interested in this one first, as it takes xonsh in the right direction (IMO). This changes things such that the final process in a spec won't have its stderr captured unless the capture mode indicates it should be, which should be closer in behaviour to what more traditional shells do, and matches the documentation for $() (it currently kind of matches the doc, but I won't go into it). _safe_pipe_properties(w, use_tty=use_tty) R, w = pty.openpty() if use_tty else os.pipe() Last.stderr = None # must truly stream on windows I'm still happy to help out with debugging the issues I've found though. I've gone back a couple of releases and this has been present in all of them for me.ĮDIT: If it's any consolation to people who want to be able to use something in the meantime, I've found that neither of my issues occur with or, so I'm just going to migrate to using one of these. In case it's relevant, I've tried this with both readline and prompt_toolkit, same result. A race condition of some sort, maybe? I'm not sure how best to debug xonsh, so if there's anything I can do to help figure this out, let me know. I've straced fzf and verified that it is indeed writing '* master\n' to stdout in both situations, so I'm not sure what's going on. ~/projects/xonsh master $ $OUTPUT = $(git branch | fzf) | encoding errors | surrogateescape ~/projects/xonsh master $ $OUTPUT = $(git branch | ~/projects/xonsh master $ (Note: Run the Wizard or create a ~/.xonshrc file to suppress the welcome ~/projects/xonsh master $ xonfig Xonfig wizard -> Run the configuration wizard and claim your shell Xonfig tutorial -> Launch the tutorial in the browser
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |