MCPcopy Create free account
hub / github.com/ddev/ddev / trimProgramName

Function trimProgramName

cmd/ddev/cmd/aliases.go:73–79  ·  view source on GitHub ↗

trimProgramName removes the program name from the command path

(commandPath string)

Source from the content-addressed store, hash-verified

71
72// trimProgramName removes the program name from the command path
73func trimProgramName(commandPath string) string {
74 parts := strings.SplitN(commandPath, " ", 2)
75 if len(parts) > 1 {
76 return parts[1]
77 }
78 return ""
79}
80
81func init() {
82 RootCmd.AddCommand(AliasesCmd)

Callers 2

collectAliasesFunction · 0.85
buildFullCommandPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected