Andy Kipp

Results 470 comments of Andy Kipp

JFYI. For this: ```xsh set -e ls nonono || true # false || true echo "success" ``` the xonsh equvalent for now is this: ```xsh $RAISE_SUBPROC_ERROR = True try: ls...

You can create syntax sugar for this using [macro call](https://xon.sh/tutorial_macros.html#function-macros): ```xsh import subprocess def ignore_error(cmd): """Ignore failing of the command.""" try: execx(cmd) except subprocess.CalledProcessError: pass $RAISE_SUBPROC_ERROR = False ignore_error!(echo 1...

I figured this out the case. What bash doing. In fact it implicitly overrides the execution of a logical expression and the execution of process. If we run `echo 1...

Can you repeat this in docker? i.e. ```python docker run --rm -it fedora /bin/bash \ -c "yum install -y pip && pip install xonsh && xonsh" ```

Solved in https://github.com/xonsh/xonsh/pull/5380. Now `$RAISE_SUBPROC_ERROR = True` allows to achieve interrupting.

I'm going to close this until getting new info. I recommend to try to trace this by using [xunter](https://github.com/anki-code/xunter).

I can't repeat this in Python 3.11.6. I can repeat this in xonsh 0.14.4. Thanks!

Hi @AstraLuma! Yeah, capturing requires improvements, [you know it better than me](https://github.com/xonsh/xonsh/issues/2159) ) I've tested this on Arch: ```python __xonsh__.commands_cache.threadable_predictors['ssh'] = lambda *a, **kw: True !(ssh host -T "echo 1")...

I want to put here the pointer to the code that related of how threading flags work: https://github.com/xonsh/xonsh/blob/5a792a6eec4889cbbc50619da6b26f7471d7ce5d/xonsh/procs/specs.py#L705-L728 As we can see the threading check is checking the last command...