Skip to content

Commit

Permalink
Merge pull request #292 from rsteube/update-iscallback
Browse files Browse the repository at this point in the history
updated IsCallback
  • Loading branch information
rsteube authored Apr 24, 2021
2 parents ba0d91f + e1b49d3 commit 6810b4d
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 6810b4d

Please sign in to comment.