joerdav / xc

Markdown defined task runner.
https://xcfile.dev/
MIT License
1.16k stars 27 forks source link

Support for mutli-line tasks #3

Closed a-h closed 2 years ago

a-h commented 2 years ago

I wanted to create a multi-line task, but it's outputting a single line:

Is that expected?

### serve-local-tests

Run a local Gemini server.

```sh
echo add '127.0.0.1       a-h.gemini' to your /etc/hosts file
openssl ecparam -genkey -name secp384r1 -out server.key
openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 -subj "/C=/ST=/L=/O=/OU=/CN=a-h.gemini"
go run ./cmd/main.go serve --domain=a-h.gemini --certFile=server.crt --keyFile=server.key --path=./tests
a-h commented 2 years ago

I just get the output:

.: echo add '127.0.0.1       a-h.gemini' to your /etc/hosts fileopenssl ecparam -genkey -name secp384r1 -out server.keyopenssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 -subj "/C=/ST=/L=/O=/OU=/CN=a-h.gemini"go run ./cmd/main.go serve --domain=a-h.gemini --certFile=server.crt --keyFile=server.key --path=./tests
add '127.0.0.1       a-h.gemini' to your /etc/hosts fileopenssl ecparam -genkey -name secp384r1 -out server.keyopenssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 -subj "/C=/ST=/L=/O=/OU=/CN=a-h.gemini"go run ./cmd/main.go serve --domain=a-h.gemini --certFile=server.crt --keyFile=server.key --path=./tests
joerdav commented 2 years ago

@a-h I originally disabled multiline tasks because they weren't running in the same shell. I've added this back. And made it echo the command between so that it's clear where a new command starts/stops.

However, separate tasks still run in a different shell, does that make sense?

a-h commented 2 years ago

Thanks, it works great.