Skip to content

Commit

Permalink
Merge pull request #1058 from rsteube/aws-nospace
Browse files Browse the repository at this point in the history
aws: nospace fix
  • Loading branch information
rsteube authored Apr 25, 2022
2 parents 2c1e1a9 + 7594dda commit 349fa44
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions completers/aws_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,13 @@ func init() {
if lines[0] == "" {
return carapace.ActionValues()
}
nospace := true
for index, line := range lines {
if strings.HasSuffix(line, " ") {
lines[index] = strings.TrimSuffix(line, " ")
nospace = false
lines[index] = strings.TrimSuffix(line, " ") // v1 has space suffix
}
}
a := carapace.ActionValues(lines[:len(lines)-1]...)
if nospace ||
strings.HasPrefix(current, "file://") ||
if strings.HasPrefix(current, "file://") ||
strings.HasPrefix(current, "fileb://") {
return a.NoSpace()
}
Expand Down

0 comments on commit 349fa44

Please sign in to comment.