summaryrefslogtreecommitdiffstats
path: root/pkg/gui/services
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-06-07 10:15:49 +1000
committerJesse Duffield <jessedduffield@gmail.com>2023-06-07 10:18:01 +1000
commita694c458dd38d960189d4fc4b288e95ab692f404 (patch)
treeb0fe726aad393e9e8f180efcd94d1e8a982ee0ad /pkg/gui/services
parentced773ab18a116f926b2c28507d71cf283701fff (diff)
Support authors and tags in custom command suggestions preset
Diffstat (limited to 'pkg/gui/services')
-rw-r--r--pkg/gui/services/custom_commands/handler_creator.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkg/gui/services/custom_commands/handler_creator.go b/pkg/gui/services/custom_commands/handler_creator.go
index 4dc6bc86e..404753edc 100644
--- a/pkg/gui/services/custom_commands/handler_creator.go
+++ b/pkg/gui/services/custom_commands/handler_creator.go
@@ -161,16 +161,20 @@ func (self *HandlerCreator) getCommandSuggestionsFn(command string) (func(string
func (self *HandlerCreator) getPresetSuggestionsFn(preset string) (func(string) []*types.Suggestion, error) {
switch preset {
- case "files":
- return self.suggestionsHelper.GetFilePathSuggestionsFunc(), nil
+ case "authors":
+ return self.suggestionsHelper.GetAuthorsSuggestionsFunc(), nil
case "branches":
return self.suggestionsHelper.GetBranchNameSuggestionsFunc(), nil
+ case "files":
+ return self.suggestionsHelper.GetFilePathSuggestionsFunc(), nil
+ case "refs":
+ return self.suggestionsHelper.GetRefsSuggestionsFunc(), nil
case "remotes":
return self.suggestionsHelper.GetRemoteSuggestionsFunc(), nil
case "remoteBranches":
return self.suggestionsHelper.GetRemoteBranchesSuggestionsFunc("/"), nil
- case "refs":
- return self.suggestionsHelper.GetRefsSuggestionsFunc(), nil
+ case "tags":
+ return self.suggestionsHelper.GetTagsSuggestionsFunc(), nil
default:
return nil, fmt.Errorf("Unknown value for suggestionsPreset in custom command: %s. Valid values: files, branches, remotes, remoteBranches, refs", preset)
}