Skip to content

Commit

Permalink
add: flags group parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhas committed Aug 1, 2020
1 parent 375312c commit b7868c2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spicetify.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ func init() {
// Separates flags and commands
for _, v := range os.Args[1:] {
if v[0] == '-' && v != "-1" {
flags = append(flags, v)
if v[1] != '-' && len(v) > 2 {
for _, char := range v[1:] {
flags = append(flags, "-"+string(char))
}
} else {
flags = append(flags, v)
}
} else {
commands = append(commands, v)
}
Expand Down

0 comments on commit b7868c2

Please sign in to comment.