fix: reuse cmk's CLI params to call piped cmd (#114)
diff --git a/cli/exec.go b/cli/exec.go index 27ff811..bf3948b 100644 --- a/cli/exec.go +++ b/cli/exec.go
@@ -40,7 +40,8 @@ if runtime.GOOS != "windows" { for _, arg := range args { if arg == "|" { - result, err := exec.Command("bash", "-c", fmt.Sprintf("%s %v", os.Args[0], line)).Output() + fullCommand := fmt.Sprintf("%s %v", strings.Join(os.Args, " "), line) + result, err := exec.Command("bash", "-c", fullCommand).Output() fmt.Print(string(result)) return err }