Skip to content

Commit

Permalink
updated IsCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Apr 24, 2021
1 parent ba0d91f commit e1b49d3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions carapace.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,8 @@ func processExecutables() []string {
}

// IsCallback returns true if current program invocation is a callback
// TODO update as everything is a callbcck now
func IsCallback() bool {
return len(os.Args) > 3 && os.Args[1] == "_carapace" && os.Args[3] != "state"
return len(os.Args) > 1 && os.Args[1] == "_carapace"
}

var logger = log.New(ioutil.Discard, "", log.Flags())
Expand Down

0 comments on commit e1b49d3

Please sign in to comment.