OutToPipe processes the | arg that sends output to a pipe
(cl *sshclient.Client, cmdIO *exec.CmdIO, errOk bool, sargs []string, i int)
| 292 | |
| 293 | // OutToPipe processes the | arg that sends output to a pipe |
| 294 | func (sh *Shell) OutToPipe(cl *sshclient.Client, cmdIO *exec.CmdIO, errOk bool, sargs []string, i int) []string { |
| 295 | s := sargs[i] |
| 296 | sn := len(s) |
| 297 | errf := false |
| 298 | if sn > 1 && s[1] == '&' { |
| 299 | errf = true |
| 300 | } |
| 301 | // todo: what to do here? |
| 302 | sargs = slices.Delete(sargs, i, i+1) |
| 303 | cmdIO.PushOutPipe() |
| 304 | if errf { |
| 305 | cmdIO.PushErr(cmdIO.Out) |
| 306 | } |
| 307 | // sh.HandleArgErr(errok, err) |
| 308 | return sargs |
| 309 | } |
| 310 | |
| 311 | // CmdArgs processes expressions involving "args" for commands |
| 312 | func (sh *Shell) CmdArgs(errOk bool, sargs []string, i int) []string { |
no test coverage detected