Skip to content

Pass arguments to ref tasks #308

Answered by nat-n
guillaume-alliander asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @guillaume-alliander, Good question!

Sadly I'm not sure there's a nice way to do exactly what you're asking for.

I guess one nice solution would be if ref tasks also accepted the advanced syntax for parameter expansion ${check:+ --diff}. I've been planning to make this syntax acceptable in more places so I'll add this to my list.

Another approach would be to implement another missing feature I've been considering for a while (but I'm not yet convinced about a design) which is to allow all unparsed arguments to be accessed via a single variable like "format ${ALL_ARGS_GO_HERE}".

Fantasies aside, a not very satisfying workaround could be to use an switch task like the following example w…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@guillaume-alliander
Comment options

@nat-n
Comment options

@guillaume-alliander
Comment options

@nat-n
Comment options

@guillaume-alliander
Comment options

Answer selected by guillaume-alliander
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants