casey / just

🤖 Just a command runner
https://just.systems
Creative Commons Zero v1.0 Universal
19.62k stars 440 forks source link

Feature Request - fmt to read from stdin and write to stdout without touching file on disk #1586

Open peterhoeg opened 1 year ago

peterhoeg commented 1 year ago

Many of the various editors formatting plugins expect data to flow via stdin/stdout rather than touching the file directly. It would be great if just --fmt could do that too.

neunenak commented 1 year ago

just --dump will output the formatted version of the current justfile to stdout. This could probably be documented better though.

peterhoeg commented 1 year ago

Thanks for that - the problem with --dump' is that it includes!include'’d files as outlined in #1585 making it useless for this purpose.

FelixZY commented 1 month ago

+1 for this! I wanted to set up the custom local formatters vscode plugin but was unable to do so because there is no way to read from stdin.

laniakea64 commented 1 month ago

Would this be covered by https://github.com/casey/just/pull/1933 ?

FelixZY commented 1 month ago

@laniakea64 yes, looks like it 👍