casey / casey/just

Inherited command with output

Open
#1,629 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
35.8k
Forks
846
Avg merge
27m
Merged PRs (30d)
3

Description

I'm trying to write two commands that write out yaml. One to screen, the other to file.

I was hoping the to file could call the to screen and just redirect the output.

```
newsub channelname showname url:
@echo
@echo {{channelname}}:
@echo ' preset:'
@echo ' - "tv_show"'
@echo ' - "only_recent_videos"'
@echo
@echo ' overrides:'
@echo ' # Required to specify for every subscription'
@echo ' tv_show_name: "{{showname}}"'
@echo ' url: "{{url}}"'
@echo ' # Optional'
@echo ' tv_show_genre: "Cars"'

newsubappend channelname showname url:
just newsub {{channelname}} {{showname}} {{url}} >> subscription.yaml
```

But alas
```
just newsubappend newchanelappend "mynew channel" "http://newurl"
just newsub newchanelappend mynew channel http://newurl >> subscriptions.yaml
error: Justfile does not contain recipe `http://newurl`.
error: Recipe `newsubappend` failed on line 20 with exit code 1
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.