diff --git a/pkg/actions/bridge/bash.go b/pkg/actions/bridge/bash.go index 2911cbe..63dc1b8 100644 --- a/pkg/actions/bridge/bash.go +++ b/pkg/actions/bridge/bash.go @@ -19,7 +19,7 @@ var bashSnippet string func ActionBash(command ...string) carapace.Action { return carapace.ActionCallback(func(c carapace.Context) carapace.Action { if len(command) == 0 { - return carapace.ActionMessage("missing argument [ActionFish]") + return carapace.ActionMessage("missing argument [ActionBash]") } configDir, err := xdg.UserConfigDir() @@ -44,7 +44,7 @@ func ActionBash(command ...string) carapace.Action { return carapace.ActionMessage(err.Error()) } - c.Setenv("COMP_LINE", shlex.Join(args)) // TODO TODO other COMP_* variables + c.Setenv("COMP_LINE", shlex.Join(args)) // TODO other COMP_* variables return carapace.ActionExecCommand("bash", "--rcfile", configPath, "-i", "-c", bashSnippet, strings.Join(args, " "))(func(output []byte) carapace.Action { lines := strings.Split(string(output), "\n") return carapace.ActionValues(lines[:len(lines)-1]...).StyleF(style.ForPath) diff --git a/pkg/actions/bridge/fish.go b/pkg/actions/bridge/fish.go index 90ff3e6..0b35fc3 100644 --- a/pkg/actions/bridge/fish.go +++ b/pkg/actions/bridge/fish.go @@ -23,18 +23,8 @@ func ActionFish(command ...string) carapace.Action { return carapace.ActionMessage(err.Error()) } - // TODO verify - // replacer := strings.NewReplacer( - // ` `, `\ `, - // `"`, `\""`, - // ) - args := append(command, c.Args...) - // TODO verify - // args = append(args, c.Value) - // for index, arg := range args { - // args[index] = replacer.Replace(arg) - // } + args = append(command, c.Value) configPath := fmt.Sprintf("%v/carapace/bridge/fish/config.fish", configDir) if err := ensureExists(configPath); err != nil {