Repository: xonsh/xonsh

Issue:
Attributes in CommandPipeline.__repr__ are str() instead of repr()
<!--- Provide a general summary of the issue in the Title above -->
<!--- If you have a question along the lines of "How do I do this Bash command in xonsh"
please first look over the Bash to Xonsh translation guide: https://xon.sh/bash_to_xsh.html
If you don't find an answer there, please do open an issue! -->

## xonfig

<details>

```
$ xonfig
+------------------+-----------------+
| xonsh            | 0.9.24          |
| Python           | 3.9.0           |
| PLY              | 3.11            |
| have readline    | True            |
| prompt toolkit   | 3.0.5           |
| shell type       | prompt_toolkit  |
| pygments         | 2.6.1           |
| on posix         | True            |
| on linux         | True            |
| distro           | fedora          |
| on darwin        | False           |
| on windows       | False           |
| on cygwin        | False           |
| on msys2         | False           |
| is superuser     | False           |
| default encoding | utf-8           |
| xonsh encoding   | utf-8           |
| encoding errors  | surrogateescape |
| on jupyter       | False           |
| jupyter kernel   | None            |
+------------------+-----------------+

```

</details>

## Expected Behavior
<!--- Tell us what should happen -->

When I do `!(echo hello)`, I expect all attributes in the returned CommandPipeline repr string to be repr instead of str.

## Current Behavior
<!--- Tell us what happens instead of the expected behavior -->
<!--- If part of your bug report is a traceback, please first enter debug mode before triggering the error
To enter debug mode, set the environment variable `XONSH_DEBUG=1` _before_ starting `xonsh`.
On Linux and OSX, an easy way to to do this is to run `env XONSH_DEBUG=1 xonsh` -->

```
$ !(echo hello)                                                                                                     
CommandPipeline(stdin=<_io.BytesIO object at 0x7fc900c645e0>, stdout=<_io.BytesIO object at 0x7fc900c64310>, stderr=<_io.BytesIO object at 0x7fc900c64360>, pid=5286, returncode=0, args=['echo', 'hello'], alias=None, stdin_redirect=['<stdin>', 'r'], stdout_redirect=[9, 'wb'], stderr_redirect=[12, 'w'], timestamps=[1603982511.7501793, 1603982511.7609427], executed_cmd=['echo', 'hello'], input=, output=hello
, errors=None)
```

Note the newline printed in the middle of that object, because `output` is not a repr-escaped string.

## Steps to Reproduce
<!--- Please try to write out a minimal reproducible snippet to trigger the bug, it will help us fix it! -->

See above

## For community
⬇️  **Please click the 👍 reaction instead of leaving a `+1` or 👍  comment**

---

I'll have a PR really soon. This should be super easy to fix.


Discussion:

Resolving patch:
diff --git a/xonsh/procs/pipelines.py b/xonsh/procs/pipelines.py
--- a/xonsh/procs/pipelines.py
+++ b/xonsh/procs/pipelines.py
@@ -176,7 +176,7 @@ def __init__(self, specs):
 
     def __repr__(self):
         s = self.__class__.__name__ + "("
-        s += ", ".join(a + "=" + str(getattr(self, a)) for a in self.attrnames)
+        s += ", ".join(a + "=" + repr(getattr(self, a)) for a in self.attrnames)
         s += ")"
         return s
 


Test patch: