MCPcopy Create free account
hub / github.com/celer-pkg/celer / doRegister

Method doRegister

cmds/cmd_integrate.go:156–167  ·  view source on GitHub ↗
(shell completion.ShellType)

Source from the content-addressed store, hash-verified

154}
155
156func (i *integrateCmd) doRegister(shell completion.ShellType) error {
157 switch shell {
158 case completion.BashShell:
159 return i.bashCompletion.Register()
160 case completion.ZshShell:
161 return i.zshCompletion.Register()
162 case completion.TypePowerShell:
163 return i.psCompletion.Register()
164 default:
165 return fmt.Errorf("unsupported shell: %s", i.getShellName(shell))
166 }
167}
168
169func (i *integrateCmd) completion(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
170 var suggestions []string

Callers 1

handleRegisterMethod · 0.95

Calls 2

getShellNameMethod · 0.95
RegisterMethod · 0.65

Tested by

no test coverage detected