Andy Kipp
                                            Andy Kipp
                                        
                                    Reported [Awpteamoose](https://github.com/Awpteamoose): > `history | grep foo` outputs matches and then hangs on Windows, regardless of whether there actually were matches or not. I'm using `wt.exe` for terminal, `xonsh --no-rc`...
Hi @AdamJamil ! 1. It looks like you want to create something like [xontrib-pipeliner](https://github.com/anki-code/xontrib-pipeliner). Please take a look on [Pipeliner exec](https://github.com/anki-code/xontrib-pipeliner/blob/master/README.md#pipeliner-exec). 2. I've tested your code on Arch Linux and...
> Try touch a b c in the directory first, then maybe 20 iters of my code Ok, after increasing the counter to 100 I can repeat something similar on...
> was it necessary to change the arg to an fstring using i, in order to reproduce the result? I did it to just increase the count of files in...
@AdamJamil please rename this issue to `OSError: [Errno 9] Bad file descriptor`. I can repeat this also for the ExecAlias: ```python aliases['e'] = 'echo -n @(1)' # ExecAlias for i...
I've tested the [case described above around ExecAlias](https://github.com/xonsh/xonsh/issues/4224#issuecomment-820567660) and it fails on all previous versions of xonsh. This is not a regress issue.
> And notice that the io.open(integer) fails on the SECOND write. Good catch. We have to understand how to fix the xonsh code.
I can confirm that it works. Could you explain the machinery behind this fix? ## Workaround 2 ```python xonsh --no-rc import gc gc.disable() aliases['e'] = 'echo -n @(1)' # ExecAlias...
@ediphy-dwild yeah (thank you for your effort!) I have the same hypothesis after diving into this part of code. I give more probability to "the same fd number is reused"....
## Workaround 3 Another workaround is to [avoid using `ProcProxyThread`](https://github.com/xonsh/xonsh/blob/4dc08232e615a75a524fbf96f17402a7a5b353a5/xonsh/procs/specs.py#L652-L655) by [marking the alias as unthreadable](https://xon.sh/tutorial.html#unthreadable-aliases): ```python from xonsh.tools import unthreadable @unthreadable def _e(): execx('echo -n 1') aliases['e'] = _e...