fix(selector): exit on empty history

This commit is contained in:
yory8 2019-07-17 10:03:41 +02:00
parent 1930514efb
commit 865a378804

View file

@ -44,6 +44,9 @@ func main() {
persist := !*noPersist
listen(history, histfile, persist, *max)
} else if *asSelector {
if len(history) == 0 {
log.Fatal("No history available")
}
if err := selector(history, *max, *tool); err != nil {
log.Fatal(err)
}