TranspileExecString returns transpiled tokens assuming Exec code, from a backtick-encoded string, with the given bool indicating whether [Output] is needed.
(str string, output bool)
| 168 | // from a backtick-encoded string, with the given bool indicating |
| 169 | // whether [Output] is needed. |
| 170 | func (sh *Shell) TranspileExecString(str string, output bool) Tokens { |
| 171 | if len(str) <= 1 { |
| 172 | return nil |
| 173 | } |
| 174 | ewords, err := ExecWords(str[1 : len(str)-1]) // enclosed string |
| 175 | if err != nil { |
| 176 | sh.AddError(err) |
| 177 | } |
| 178 | return sh.TranspileExec(ewords, output) |
| 179 | } |
| 180 | |
| 181 | // TranspileExec returns transpiled tokens assuming Exec code, |
| 182 | // with the given bools indicating the type of run to execute. |
no test coverage detected