This commit is contained in:
Andrey Parhomenko 2023-06-21 11:03:56 +03:00
parent cf95a7bac9
commit 029d66a8b8
2 changed files with 14 additions and 1 deletions

View file

@ -2,7 +2,9 @@ e = 5
v = 53
println(e + v)
println("cock", Cmd("ls").Stdout())
for v in Cmd("ls").Stdout().ShSplit() {
println("file:", v)
}
if v < 55 {
println("it fucking works")

View file

@ -37,12 +37,23 @@ var (
args []string
e *env.Env
//flag *mtool.Flags
// Standard shell separators.
shSeps = "\t\r\n "
)
func (o Output) String() string {
return string(o)
}
func (o Output) ShSplit() []string {
return strings.Fields(string(o))
}
func (o Output) Split(sep string) []string {
return strings.Split(o.String(), sep)
}
func Run(flagSet *mtool.Flags) {
printVersion := flagSet.Bool("v", false, "prints out the version and then exits")