xonsh/news
Andy Kipp 61a77ac3ce
Callable alias: fixed capturing stdout in case of redirect (#5527)
### Motivation

Closes #5512. 
The issue was introduced in #4445. It's needed to add checking the
redirect case.

### Before

```xsh
cd /tmp
@aliases.register('a')
def _a():
    print("1-hello")
    echo 2-hello
a > o.txt
# 2-hello
cat o.txt
# 1-hello
```

### After

```xsh
cd /tmp
@aliases.register('a')
def _a():
    print("1-hello")
    echo 2-hello
a > o.txt
cat o.txt
# 1-hello
# 2-hello
```

## For community
⬇️ **Please click the 👍 reaction instead of leaving a `+1` or 👍
comment**

---------

Co-authored-by: a <1@1.1>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-02 09:30:06 +02:00
..
callias_capture_redirect.rst Callable alias: fixed capturing stdout in case of redirect (#5527) 2024-07-02 09:30:06 +02:00
commands_cache_fix_update.rst Command cache: fix update cache logic (#5539) 2024-06-26 12:02:51 +05:30
disable_colors_non_int.rst colors: `COLOR_RESULTS switched to False` for non-interactive command case (#5562) 2024-07-01 21:12:46 +05:30
opt_sqlite.rst news 2024-06-25 00:46:32 +02:00
prompt_switch_to_ptk.rst prompt: switching to prompt_toolkit in case of stdin with interactive mode (#5536) 2024-06-25 21:34:14 +05:30
sqlite-history-gc.rst fix: Fixed `history gc invocation failing when sqlite` history … (#5540) 2024-06-26 13:19:26 +05:30
TEMPLATE.rst fix 2024-06-24 21:46:09 +02:00
xonsh_refactoring.rst fix news 2024-06-29 16:26:49 +02:00