MCPcopy
hub / github.com/spicetify/cli / DisplayAllConfig

Function DisplayAllConfig

src/cmd/config.go:40–78  ·  view source on GitHub ↗

DisplayAllConfig displays all configs in all sections

()

Source from the content-addressed store, hash-verified

38
39// DisplayAllConfig displays all configs in all sections
40func DisplayAllConfig() {
41 maxLen := 30
42 utils.PrintBold("Settings")
43 for _, key := range settingSection.Keys() {
44 name := key.Name()
45 log.Println(name + strings.Repeat(" ", maxLen-len(name)) + key.Value())
46 }
47
48 log.Println()
49 utils.PrintBold("Preprocesses")
50 for _, key := range preprocSection.Keys() {
51 name := key.Name()
52 log.Println(name + strings.Repeat(" ", maxLen-len(name)) + key.Value())
53 }
54
55 log.Println()
56 utils.PrintBold("AdditionalFeatures")
57 for _, key := range featureSection.Keys() {
58 name := key.Name()
59 if name == "extensions" || name == "custom_apps" || name == "spotify_launch_flags" {
60 list := key.Strings("|")
61 listLen := len(list)
62 if listLen == 0 {
63 log.Println(name)
64 } else {
65 log.Println(name + strings.Repeat(" ", maxLen-len(name)) + strings.Join(list, " | "))
66 }
67 } else {
68 log.Println(name + strings.Repeat(" ", maxLen-len(name)) + key.Value())
69 }
70 }
71
72 log.Println()
73 utils.PrintBold("Backup")
74 for _, key := range backupSection.Keys() {
75 name := key.Name()
76 log.Println(name + strings.Repeat(" ", maxLen-len(name)) + key.Value())
77 }
78}
79
80// DisplayConfig displays value of requested config field
81func DisplayConfig(field string) {

Callers 1

mainFunction · 0.92

Calls 1

PrintBoldFunction · 0.92

Tested by

no test coverage detected