Skip to content

Commit

Permalink
Updated -a and -p usage
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwhitta committed Mar 11, 2023
1 parent d32247b commit 77473b9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
15 changes: 9 additions & 6 deletions cmd/arTTY/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func init() {
"a",
"all",
false,
"Ignore previous filtering.",
"Disable all filtering not explicitly specified.",
)
cli.Flag(
&flags.bsfact,
Expand Down Expand Up @@ -227,8 +227,9 @@ func init() {
false,
strings.Join(
[]string{
"Ignore previous flags and filtering (useful for",
"tab-completion with --ls).",
"Disable all filtering and flags not explicitly",
"specified (useful for --save or tab-completion with",
"--ls).",
},
" ",
),
Expand Down Expand Up @@ -279,16 +280,18 @@ func init() {

func setupConfig() {
// Check all and plain first
if flags.all {
if flags.all || flags.plain {
config.Set("", "art")
config.Set("", "exclude")
config.Set(false, "fit")
config.Set("", "match")
}

if flags.plain {
config.Default()
config.Set(false, "bsfact")
config.Set(false, "clear_screen")
config.Set(false, "fit")
config.Set(false, "devexcuse")
config.Set(false, "fortune")
config.Set(false, "random")
config.Set(false, "sysinfo")
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/arTTY/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func init() {
config.SetDefault("", "art")
config.SetDefault(false, "bsfact")
config.SetDefault(true, "clear_screen")
config.SetDefault([]string{"green"}, "dataColors")
config.SetDefault([]string{"light_blue"}, "dataColors")
config.SetDefault(false, "devexcuse")
config.SetDefault("", "exclude")
config.SetDefault([]string{"blue"}, "fieldColors")
Expand Down
2 changes: 1 addition & 1 deletion globals.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ var Cache *cache.ArtCache = cache.New(Version)
var devRegex = regexp.MustCompile(`<a href.+>(.+)</a>`)

// Version is the package version
const Version = "1.4.2"
const Version = "1.4.3"
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ require (
github.com/mjwhitta/pathname v1.2.4
github.com/mjwhitta/sysinfo v1.5.0
github.com/mjwhitta/where v1.2.7
github.com/stretchr/testify v1.8.1
github.com/stretchr/testify v1.8.2
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/mjwhitta/safety v1.11.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/sys v0.6.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Expand Down

0 comments on commit 77473b9

Please sign in to comment.