fix(selector): exit on empty history
This commit is contained in:
parent
1930514efb
commit
865a378804
1 changed files with 3 additions and 0 deletions
3
main.go
3
main.go
|
@ -44,6 +44,9 @@ func main() {
|
||||||
persist := !*noPersist
|
persist := !*noPersist
|
||||||
listen(history, histfile, persist, *max)
|
listen(history, histfile, persist, *max)
|
||||||
} else if *asSelector {
|
} else if *asSelector {
|
||||||
|
if len(history) == 0 {
|
||||||
|
log.Fatal("No history available")
|
||||||
|
}
|
||||||
if err := selector(history, *max, *tool); err != nil {
|
if err := selector(history, *max, *tool); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue