mani icon indicating copy to clipboard operation
mani copied to clipboard

task alias

Open emahuni opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe

It'd be useful to have an alias for a task. Such will make it easier to work in a large team and reduce mental migration from tools used in different platforms and environments.

Eg: Windows cmd: dir, but in unix it's ls

In addition this will also provide a way to invoke the same task in many different ways, avoiding the same mental clash.

Describe the solution you'd like

  build:clean:
    aliases: ['build+clean', 'build-clean', 'clean-build'],
    # next is meant for single aliases
    alias: build+clean
    desc: clean & build artifacts, which may produce dirs ("dist", "build", ".cache")
    spec: default
    commands:
      - task: rm:build
      - task: build

Additional context

List of tasks would also show these aliases.

emahuni avatar Sep 05 '22 20:09 emahuni

This is nice to have, though I'm not sure how someone is building cross-platform (mainly windows + linux/mac) tasks, they won't work on windows anyway since your relying on linux/mac commands like ls?

alajmo avatar Sep 08 '22 20:09 alajmo

That was just a contrived example of cross platform aliasing for the same thing. No practical value. But I think you get what the feature does.

emahuni avatar Sep 09 '22 08:09 emahuni