Skip to content

Commit

Permalink
bash: trim .bash from completion scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Feb 21, 2024
1 parent 566035f commit 7f1201a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/bridges/bash.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"runtime"
"strings"

"github.com/rsteube/carapace"
"github.com/rsteube/carapace/pkg/execlog"
)

Expand All @@ -23,13 +22,13 @@ func Bash() []string {
for _, location := range bashCompletionLocations() {
entries, err := os.ReadDir(location)
if err != nil {
carapace.LOG.Println(err.Error())
continue
}

for _, entry := range entries {
if !entry.IsDir() && !strings.HasPrefix(entry.Name(), "_") {
unique[entry.Name()] = true
name := strings.TrimSuffix(entry.Name(), ".bash")
unique[name] = true
}
}
}
Expand Down

0 comments on commit 7f1201a

Please # to comment.