Drop bonzai command from module

This commit is contained in:
rwxrob 2022-04-07 08:16:01 -04:00
parent a9acfa8a91
commit 1fe3463513
No known key found for this signature in database
GPG Key ID: 2B9111F33082AE77
2 changed files with 0 additions and 55 deletions

View File

@ -1,43 +0,0 @@
package main
import (
"fmt"
"strings"
"github.com/rwxrob/bonzai/help"
Z "github.com/rwxrob/bonzai/z"
"github.com/rwxrob/term"
)
func main() {
Cmd.Run()
}
var Cmd = &Z.Cmd{
Name: `bonzai`,
Summary: `bonzai command tree utility`,
Version: `v0.0.1`,
Copyright: `Copyright 2021 Robert S Muhlestein`,
License: `Apache-2.0`,
Commands: []*Z.Cmd{help.Cmd, sh2slice},
}
var sh2slice = &Z.Cmd{
Name: `sh2slice`,
Summary: `splits a shell command into arguments`,
Commands: []*Z.Cmd{help.Cmd},
Call: func(_ *Z.Cmd, args ...string) error {
list := []string{}
if len(args) == 0 {
args = append(args, term.Read())
}
for _, a := range args {
// FIXME add awareness or globs and quoted segments
for _, aa := range strings.Fields(a) {
list = append(list, fmt.Sprintf("%q", aa))
}
}
fmt.Println(strings.Join(list, ","))
return nil
},
}

View File

@ -1,12 +0,0 @@
go 1.19
use (
.
../fs
../twitch
../fn
../scan
../to
../uniq
../term
)