We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe2a6cb commit 299f0deCopy full SHA for 299f0de
1 file changed
internal/core/autocomplete_utils.go
@@ -94,7 +94,8 @@ func AutocompleteGetArg(ctx context.Context, cmd *Command, argSpec *ArgSpec, com
94
// ex with "scw instance private-nic list server-id=<tab>"
95
// we get server as resource instead of private-nic to find command "scw instance server list"
96
if !strings.HasPrefix(argName, cmd.Resource) {
97
- dashIndex := strings.Index(argName, "-")
+ // Use last index as resource name might contain a dash (ex: security-group-id)
98
+ dashIndex := strings.LastIndex(argName, "-")
99
if dashIndex > 0 {
100
argResource = argName[:dashIndex]
101
}
0 commit comments