just icon indicating copy to clipboard operation
just copied to clipboard

Allow (some) attributes on aliases

Open john-cd opened this issue 10 months ago • 1 comments

Aliases can fail if the associated recipe is conditional

  1. Allow [unix] / [windows] attributes on aliases:

[unix] alias ra := runall

[unix] @runall: ./scripts/runall.sh

  1. Or display a friendly error message that the recipe is only available in Unix / Windows?

john-cd avatar Feb 11 '25 07:02 john-cd

This seems pretty reasonable to me.

And actually, I think this already works with the alias attribute, in progress in #2615.

I think actually we could consider just disabling an alias with no warning if the corresponding recipe isn't available because of a conditional attribute.

Although we might eventually want to allow something like:

[unix]
alias build := build-unix

[windows]
alias build := build-windows

So we should make sure there aren't any implications for that.

casey avatar Feb 11 '25 16:02 casey