mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-22 16:03:49 -07:00
Change exit status (0: OK, 1: No match, 2: Error/Interrupted)
A la grep. Close #345
This commit is contained in:
@@ -261,7 +261,7 @@ func Init(theme *ColorTheme, black bool, mouse bool) {
|
||||
_screen = C.newterm(nil, C.stderr, C.stdin)
|
||||
if _screen == nil {
|
||||
fmt.Println("Invalid $TERM: " + os.Getenv("TERM"))
|
||||
os.Exit(1)
|
||||
os.Exit(2)
|
||||
}
|
||||
C.set_term(_screen)
|
||||
if mouse {
|
||||
@@ -275,7 +275,7 @@ func Init(theme *ColorTheme, black bool, mouse bool) {
|
||||
go func() {
|
||||
<-intChan
|
||||
Close()
|
||||
os.Exit(1)
|
||||
os.Exit(2)
|
||||
}()
|
||||
|
||||
if theme != nil {
|
||||
|
Reference in New Issue
Block a user