mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00

### Motivation There is no way to access to the CommandPipeline of executed command in uncaptured mode. This causes: * No chance to get return code in one universal way. * Barrier to trace and inspection. ### Before ```xsh $(ls nofile) # No way to access to the CommandPipeline of executed command. ``` ### After ```xsh $(ls nofile) __xonsh__.last.rtn # In interactive or not interactive. # 2 ``` ```xsh # Sugar sir: last = type('LastCP', (object,), {'__getattr__':lambda self, name: getattr(__xonsh__.last, name) })() ls nofile last.rtn # 2 ``` JFYI #5342 ## 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>
23 lines
231 B
ReStructuredText
23 lines
231 B
ReStructuredText
**Added:**
|
|
|
|
* Now last executed CommandPipeline is available in ``__xonsh__.last``.
|
|
|
|
**Changed:**
|
|
|
|
* <news item>
|
|
|
|
**Deprecated:**
|
|
|
|
* <news item>
|
|
|
|
**Removed:**
|
|
|
|
* <news item>
|
|
|
|
**Fixed:**
|
|
|
|
* <news item>
|
|
|
|
**Security:**
|
|
|
|
* <news item>
|