Skip to content

Commit a9800e6

Browse files
authored
Add note about issue #15326 (#1876)
* Run prettier * Add note about issue #15326 * Fix position of warning
1 parent 14551fe commit a9800e6

File tree

1 file changed

+78
-71
lines changed

1 file changed

+78
-71
lines changed

lang-guide/chapters/pipelines.md

Lines changed: 78 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -84,80 +84,87 @@ Also note that `complete` is special, it doesn't work with `e>|`, `o+e>|`.
8484

8585
## Stdio and redirection behavior examples
8686

87-
Pipeline and redirection behavior can be hard to follow when they are used with subexpressions, or custom commands. Here are some examples that show intended stdio behavior.
87+
Pipeline and redirection behavior can be hard to follow when they are used with subexpressions, or custom commands. Here are some examples that show intended stdio behavior.
8888

8989
### Examples for subexpression
9090

9191
- (^cmd1 | ^cmd2; ^cmd3 | ^cmd4)
9292

93-
| Command | Stdout | Stderr |
94-
| ------- | -------- | ---------- |
95-
| cmd1 | Piped | Terminal |
96-
| cmd2 | *Terminal* | Terminal |
97-
| cmd3 | Piped | Terminal |
98-
| cmd4 | Terminal | Terminal |
93+
| Command | Stdout | Stderr |
94+
| ------- | ---------- | -------- |
95+
| cmd1 | Piped | Terminal |
96+
| cmd2 | _Terminal_ | Terminal |
97+
| cmd3 | Piped | Terminal |
98+
| cmd4 | Terminal | Terminal |
9999

100100
- (^cmd1 | ^cmd2; ^cmd3 | ^cmd4) | ^cmd5
101101

102-
It runs `(^cmd1 | ^cmd2; ^cmd3 | ^cmd4)` first, then pipes *stdout* to `^cmd5`, where both stdout and stderr are directed to the Terminal.
102+
It runs `(^cmd1 | ^cmd2; ^cmd3 | ^cmd4)` first, then pipes _stdout_ to `^cmd5`, where both stdout and stderr are directed to the Terminal.
103103

104-
| Command | Stdout | Stderr |
105-
| ------- | -------- | ---------- |
106-
| cmd1 | Piped | Terminal |
107-
| cmd2 | *Terminal* | Terminal |
108-
| cmd3 | Piped | Terminal |
109-
| cmd4 | Piped | Terminal |
104+
| Command | Stdout | Stderr |
105+
| ------- | ---------- | -------- |
106+
| cmd1 | Piped | Terminal |
107+
| cmd2 | _Terminal_ | Terminal |
108+
| cmd3 | Piped | Terminal |
109+
| cmd4 | Piped | Terminal |
110110

111111
- (^cmd1 | ^cmd2; ^cmd3 | ^cmd4) e>| ^cmd5
112112

113-
It runs `(^cmd1 | ^cmd2; ^cmd3 | ^cmd4)` first, then pipes *stderr* to `^cmd5`, where both stdout and stderr are directed to the Terminal.
113+
It runs `(^cmd1 | ^cmd2; ^cmd3 | ^cmd4)` first, then pipes _stderr_ to `^cmd5`, where both stdout and stderr are directed to the Terminal.
114114

115115
| Command | Stdout | Stderr |
116116
| ------- | -------- | -------- |
117117
| cmd1 | Piped | Terminal |
118118
| cmd2 | Terminal | Terminal |
119119
| cmd3 | Piped | Terminal |
120-
| cmd4 | Terminal | Piped |
120+
| cmd4 | Terminal | Piped |
121121

122122
- (^cmd1 | ^cmd2; ^cmd3 | ^cmd4) o+e>| ^cmd5
123123

124-
It runs `(^cmd1 | ^cmd2; ^cmd3 | ^cmd4)` first, then pipes *stdout and stderr* to `^cmd5`, where both stdout and stderr are directed to the Terminal.
124+
It runs `(^cmd1 | ^cmd2; ^cmd3 | ^cmd4)` first, then pipes _stdout and stderr_ to `^cmd5`, where both stdout and stderr are directed to the Terminal.
125125

126126
| Command | Stdout | Stderr |
127127
| ------- | -------- | -------- |
128128
| cmd1 | Piped | Terminal |
129129
| cmd2 | Terminal | Terminal |
130130
| cmd3 | Piped | Terminal |
131-
| cmd4 | Piped | Piped |
131+
| cmd4 | Piped | Piped |
132+
133+
::: warning
134+
135+
Please note that the following 3 examples are currently broken due to a regression documented [issue #15326](https://github.com/nushell/nushell/issues/15326).
136+
137+
:::
132138

133139
- (^cmd1 | ^cmd2; ^cmd3 | ^cmd4) o> test.out
134140

135-
| Command | Stdout | Stderr |
136-
| ------- | -------- | -------- |
137-
| cmd1 | Piped | Terminal |
138-
| cmd2 | File | Terminal |
139-
| cmd3 | Piped | Terminal |
140-
| cmd4 | File | Terminal |
141+
| Command | Stdout | Stderr |
142+
| ------- | ------ | -------- |
143+
| cmd1 | Piped | Terminal |
144+
| cmd2 | File | Terminal |
145+
| cmd3 | Piped | Terminal |
146+
| cmd4 | File | Terminal |
141147

142148
- (^cmd1 | ^cmd2; ^cmd3 | ^cmd4) e> test.out
143149

144-
| Command | Stdout | Stderr |
145-
| ------- | -------- | -------- |
146-
| cmd1 | Piped | File |
147-
| cmd2 | Terminal | File |
148-
| cmd3 | Piped | File |
149-
| cmd4 | Terminal | File |
150+
| Command | Stdout | Stderr |
151+
| ------- | -------- | ------ |
152+
| cmd1 | Piped | File |
153+
| cmd2 | Terminal | File |
154+
| cmd3 | Piped | File |
155+
| cmd4 | Terminal | File |
150156

151157
- (^cmd1 | ^cmd2; ^cmd3 | ^cmd4) o+e> test.out
152158

153-
| Command | Stdout | Stderr |
154-
| ------- | -------- | -------- |
155-
| cmd1 | Piped | File |
156-
| cmd2 | File | File |
157-
| cmd3 | Piped | File |
158-
| cmd4 | File | File |
159+
| Command | Stdout | Stderr |
160+
| ------- | ------ | ------ |
161+
| cmd1 | Piped | File |
162+
| cmd2 | File | File |
163+
| cmd3 | Piped | File |
164+
| cmd4 | File | File |
159165

160166
### Examples for custom command
167+
161168
Given the following custom commands
162169

163170
```nu
@@ -173,69 +180,69 @@ In the examples below the body of `custom-cmd` is `(^cmd1 | ^cmd2; ^cmd3 | ^cmd4
173180

174181
- custom-cmd
175182

176-
| Command | Stdout | Stderr |
177-
| ------- | -------- | ---------- |
178-
| cmd1 | Piped | Terminal |
179-
| cmd2 | *Terminal* | Terminal |
180-
| cmd3 | Piped | Terminal |
181-
| cmd4 | Terminal | Terminal |
183+
| Command | Stdout | Stderr |
184+
| ------- | ---------- | -------- |
185+
| cmd1 | Piped | Terminal |
186+
| cmd2 | _Terminal_ | Terminal |
187+
| cmd3 | Piped | Terminal |
188+
| cmd4 | Terminal | Terminal |
182189

183190
- custom-cmd | ^cmd5
184191

185-
It runs `custom-cmd` first, then pipes *stdout* to `^cmd5`, where both stdout and stderr are directed to the Terminal.
192+
It runs `custom-cmd` first, then pipes _stdout_ to `^cmd5`, where both stdout and stderr are directed to the Terminal.
186193

187-
| Command | Stdout | Stderr |
188-
| ------- | -------- | ---------- |
189-
| cmd1 | Piped | Terminal |
190-
| cmd2 | *Terminal* | Terminal |
191-
| cmd3 | Piped | Terminal |
192-
| cmd4 | Piped | Terminal |
194+
| Command | Stdout | Stderr |
195+
| ------- | ---------- | -------- |
196+
| cmd1 | Piped | Terminal |
197+
| cmd2 | _Terminal_ | Terminal |
198+
| cmd3 | Piped | Terminal |
199+
| cmd4 | Piped | Terminal |
193200

194201
- custom-cmd e>| ^cmd5
195202

196-
It runs `custom-cmd` first, then pipes *stderr* to `^cmd5`, where both stdout and stderr are directed to the Terminal.
203+
It runs `custom-cmd` first, then pipes _stderr_ to `^cmd5`, where both stdout and stderr are directed to the Terminal.
197204

198205
| Command | Stdout | Stderr |
199206
| ------- | -------- | -------- |
200207
| cmd1 | Piped | Terminal |
201208
| cmd2 | Terminal | Terminal |
202209
| cmd3 | Piped | Terminal |
203-
| cmd4 | Terminal | Piped |
210+
| cmd4 | Terminal | Piped |
204211

205212
- custom-cmd o+e>| ^cmd5
206213

207-
It runs `custom-cmd` first, then pipes *stdout and stderr* to `^cmd5`, where both stdout and stderr are directed to the Terminal.
214+
It runs `custom-cmd` first, then pipes _stdout and stderr_ to `^cmd5`, where both stdout and stderr are directed to the Terminal.
208215

209216
| Command | Stdout | Stderr |
210217
| ------- | -------- | -------- |
211218
| cmd1 | Piped | Terminal |
212219
| cmd2 | Terminal | Terminal |
213220
| cmd3 | Piped | Terminal |
214-
| cmd4 | Piped | Piped |
221+
| cmd4 | Piped | Piped |
215222

216223
- custom-cmd o> test.out
217224

218-
| Command | Stdout | Stderr |
219-
| ------- | -------- | -------- |
220-
| cmd1 | Piped | Terminal |
221-
| cmd2 | File | Terminal |
222-
| cmd3 | Piped | Terminal |
223-
| cmd4 | File | Terminal |
225+
| Command | Stdout | Stderr |
226+
| ------- | ------ | -------- |
227+
| cmd1 | Piped | Terminal |
228+
| cmd2 | File | Terminal |
229+
| cmd3 | Piped | Terminal |
230+
| cmd4 | File | Terminal |
224231

225232
- custom-cmd e> test.out
226233

227-
| Command | Stdout | Stderr |
228-
| ------- | -------- | -------- |
229-
| cmd1 | Piped | File |
230-
| cmd2 | Terminal | File |
231-
| cmd3 | Piped | File |
232-
| cmd4 | Terminal | File |
234+
| Command | Stdout | Stderr |
235+
| ------- | -------- | ------ |
236+
| cmd1 | Piped | File |
237+
| cmd2 | Terminal | File |
238+
| cmd3 | Piped | File |
239+
| cmd4 | Terminal | File |
233240

234241
- custom-cmd o+e> test.out
235242

236-
| Command | Stdout | Stderr |
237-
| ------- | -------- | -------- |
238-
| cmd1 | Piped | File |
239-
| cmd2 | File | File |
240-
| cmd3 | Piped | File |
241-
| cmd4 | File | File |
243+
| Command | Stdout | Stderr |
244+
| ------- | ------ | ------ |
245+
| cmd1 | Piped | File |
246+
| cmd2 | File | File |
247+
| cmd3 | Piped | File |
248+
| cmd4 | File | File |

0 commit comments

Comments
 (0)