Skip to content

Commit

Permalink
Merge pull request #2103 from rsteube/macro-cmd-output
Browse files Browse the repository at this point in the history
readded macro command output
  • Loading branch information
rsteube authored Jan 3, 2024
2 parents beaf92b + 2b77d9b commit fe77005
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/carapace/cmd/macro.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/rsteube/carapace"
"github.com/rsteube/carapace-bin/pkg/actions"
spec "github.com/rsteube/carapace-spec"
"github.com/rsteube/carapace/third_party/golang.org/x/sys/execabs"
"github.com/spf13/cobra"
)

Expand All @@ -24,7 +25,12 @@ var macroCmd = &cobra.Command{
case 1:
printMacro(args[0])
default:
// TODO macro args
mArgs := []string{"_carapace", "macro"}
mArgs = append(mArgs, args...)
mCmd := execabs.Command("carapace", mArgs...)
mCmd.Stdout = cmd.OutOrStdout()
mCmd.Stderr = cmd.ErrOrStderr()
mCmd.Run()
}
},
}
Expand Down

0 comments on commit fe77005

Please sign in to comment.