JanDeDobbeleer / aliae

Cross shell and platform alias management
https://aliae.dev
MIT License
73 stars 3 forks source link

Existence check of command or file #64

Closed trajano closed 8 months ago

trajano commented 8 months ago

Code of Conduct

What would you like to see changed/added?

{{ .CommandAvailable "some-command" }}

But this is a bit complicated because on bash it should be doing something like command -v "$1" > /dev/null

{{ .FileExists "{{.Home}}/my-stuff" }}

Would be a simple [ -e $1 ]

JanDeDobbeleer commented 8 months ago

@trajano this is a duplicate request of #60

trajano commented 8 months ago

Oops, I changed the title of the other one.