Skip to content

Commit

Permalink
fix: Fix used values still showing in shell completion
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Jul 26, 2024
1 parent 984369a commit a71a143
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/visitor/find_args_completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ func RegisterCompletion(cmd *cobra.Command, conf *config.Config) {
}

func valueCompletion(conf *config.Config) func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return func(_ *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective) {
return func(cmd *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective) {
_ = conf.Load(cmd)

if !strings.HasPrefix(conf.Prefix, "#") {
conf.Prefix = "#" + conf.Prefix
}

v := NewFindArgs(conf)

for _, path := range args {
stat, err := os.Stat(path)
if err != nil {
Expand Down

0 comments on commit a71a143

Please sign in to comment.