Fix wrapping

pull/97/head v0.13.1
rwxrob 2 years ago
parent 26dded5d30
commit e941cc7a96
No known key found for this signature in database
GPG Key ID: 2B9111F33082AE77

@ -3,16 +3,16 @@ module github.com/rwxrob/bonzai
go 1.18
require (
github.com/rwxrob/compcmd v0.1.1
github.com/rwxrob/compcmd v0.2.3
github.com/rwxrob/fn v0.3.3
github.com/rwxrob/scan v0.6.1
github.com/rwxrob/structs v0.5.1
github.com/rwxrob/term v0.2.6
github.com/rwxrob/to v0.5.2
github.com/rwxrob/structs v0.6.0
github.com/rwxrob/term v0.2.7
github.com/rwxrob/to v0.5.5
)
require (
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/sys v0.0.0-20220412071739-889880a91fd5 // indirect
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 // indirect
golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect
)

@ -1,18 +1,30 @@
github.com/rwxrob/compcmd v0.1.1 h1:VCpA28yXWSS5ijAe6N5DswYektT1KT3ZryirINZVYgs=
github.com/rwxrob/compcmd v0.1.1/go.mod h1:l4anbcmNEBs4vNb2uxfD45jSgm2FmPvpYfBNGqlO3rc=
github.com/rwxrob/compcmd v0.2.3 h1:L05+CnLoJWpRp745+Hpz8fB0dz8SIzH0+uwSZxIZgEM=
github.com/rwxrob/compcmd v0.2.3/go.mod h1:fS9smeE6XIb/2511RU6618IimOJjg0tC69eXISxaxU4=
github.com/rwxrob/fn v0.3.3 h1:ymRQGWDhrrvoHKXLJ4WZlgI2qrC7gMOotowQMGvwmVQ=
github.com/rwxrob/fn v0.3.3/go.mod h1:omPqOqEB+dDna09z5pi5YFxq4IZqDvv3wFPUCES5LvY=
github.com/rwxrob/scan v0.6.1 h1:KMGi/kV7TY4pcVo8H/HVwwyQZ2gBFNQI3g7tT121Voo=
github.com/rwxrob/scan v0.6.1/go.mod h1:eF28AgH3YUvP7E9UrhjePRUyLq3Gh7+fR28P7Z/Ku4E=
github.com/rwxrob/structs v0.5.1 h1:epff+4ihej+EgsQx0qOAS/cn7ix3qSLor0M/AjWiV3M=
github.com/rwxrob/structs v0.5.1/go.mod h1:e888JzBSTrMMizNYFnk426F77QneVUKgdxM5inMHErY=
github.com/rwxrob/structs v0.6.0 h1:t8JVd/Pee1OGaXgT6QYmGed470C9vOw6scdH8Cr5LPg=
github.com/rwxrob/structs v0.6.0/go.mod h1:txMfzPfEiIDNM5bwhzUqxr/1QQ3ekOuj3KLT8Nt1fA0=
github.com/rwxrob/term v0.2.6 h1:C8BqqHaEh8MGYp1cVrPRlDAYPEK3HfvhGjf7l5AvnV8=
github.com/rwxrob/term v0.2.6/go.mod h1:II0qQ7aHUdPniZCAPWOdYwugcZqdmRmEWIJQN7Z8NA0=
github.com/rwxrob/term v0.2.7 h1:uFhFcZkjphRQHhkzaV5G34r4es7R6qEw52XA3xD0yn0=
github.com/rwxrob/term v0.2.7/go.mod h1:II0qQ7aHUdPniZCAPWOdYwugcZqdmRmEWIJQN7Z8NA0=
github.com/rwxrob/to v0.5.2 h1:BK2xKkWNhnR5TwEzbsPpXjGODFrTrgZfXzfEdtgCeyU=
github.com/rwxrob/to v0.5.2/go.mod h1:lojk6scni4ZRYjnKJO/f2DVRTW0BB6l9LZQ/NvZZt4Y=
github.com/rwxrob/to v0.5.4 h1:eUKF6O4eLhiA/pdcl/BXfp492PZ6Lz1Vs1gQZnSZlj4=
github.com/rwxrob/to v0.5.4/go.mod h1:lojk6scni4ZRYjnKJO/f2DVRTW0BB6l9LZQ/NvZZt4Y=
github.com/rwxrob/to v0.5.5 h1:gtcsVTF/0XAfsWLTQ3lC0byKc9XWE96Gz5icus3zk3I=
github.com/rwxrob/to v0.5.5/go.mod h1:PzU60XDkBkkiQxuiUsqwwAkjja2B5O0nKiRV9nHO84Q=
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA=
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/sys v0.0.0-20220412071739-889880a91fd5 h1:NubxfvTRuNb4RVzWrIDAUzUvREH1HkCD4JjyQTSG9As=
golang.org/x/sys v0.0.0-20220412071739-889880a91fd5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 h1:xHms4gcpe1YE7A3yIllJXP16CMAGuqwO2lX1mTyyRRc=
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 h1:EH1Deb8WZJ0xc0WK//leUHXcX9aLE5SymusoTmMZye8=
golang.org/x/term v0.0.0-20220411215600-e5f449aeb171/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=

@ -565,3 +565,51 @@ func ExamplePrintMarkf() {
// ----------------------
}
/*
func ExampleWrap_again() {
defer func() {
term.Italic = `<italic>`
term.Bold = `<bold>`
term.BoldItalic = `<bolditalic>`
term.Under = `<under>`
term.Reset = `<reset>`
}()
term.Italic = esc.Italic
term.Bold = esc.Bold
term.BoldItalic = esc.BoldItalic
term.Under = esc.Under
term.Reset = esc.Reset
Z.IndentBy = 0
Z.Columns = 40
cmd := &Z.Cmd{
Name: `some`,
Dynamic: template.FuncMap{
"builddir": func() string { return "a/build/dir" },
"buildfile": func() string { return "build.yaml" },
},
Description: `
The {{cmd .Name}} command looks for a {{pre buildfile}} file in
the specified or current directory and runs the build command on
each building them all concurrently into the {{pre builddir}}
directory where they are ready for upload to GitHub as a release.
If an argument is passed it is expected to be an explicit path to
a different build directory. If no path is specified will assume
the current directory and recursively search all parents for
{{pre buildfile}} until found creating a {{pre builddir}} within that
directory for the newly built artifacts. `,
}
fmt.Println("Output")
// fmt.Println(Z.Mark(cmd.Fill(cmd.Description)))
fmt.Println(to.Wrapped(cmd.Fill(cmd.Description), Z.Columns))
// Output:
// some
}
*/

Loading…
Cancel
Save