Skip to content

Commit

Permalink
Add posibility for reset
Browse files Browse the repository at this point in the history
  • Loading branch information
trusz committed Apr 17, 2019
1 parent 1a3592b commit ea1a819
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/rc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ func main() {

var showAll = flag.Bool("a", false, "Show all service.")
var inverse = flag.Bool("i", false, "Inverse selection. Start everything except selected ones.")
var reset = flag.Bool("r", false, "Resets selected services.")
flag.Parse()

var oldSelection = persist.LoadSelections()
var oldSelection = []string{}
if !*reset {
oldSelection = persist.LoadSelections()
}
possibleServices := yaml.LoadPossibleServices(*showAll)
services := prompt.Question(possibleServices, oldSelection, *inverse)

Expand Down

0 comments on commit ea1a819

Please sign in to comment.