Open Ernest0-Production opened 2 months ago
I think there would be value in having cross-shell aliases in mise similar to https://github.com/cpendery/kaldo
We would probably want to use the top-level [alias] key in the config, which unfortunately is already used for tools. We could probably still do this but have a migration path for people to move over to [tool_alias] or something similar to that. Or maybe we have [shell_alias] and [tool_alias] to avoid conflicting and support [alias] for backwards compatibility.
Hi! It may make sense to add the env._.alias directive, since this functionality is close to the path/source directives.
And thanks for kaldo. I didn't know about the existence of such a tool!)
yeah it could go there too
(re the OP https://github.com/jdx/mise/issues/2034#issue-2281176873 I think env._.source
doesn't quite do this, as it only pulls environment variables, not aliases or other shell-internal things. What you'd probably do is use env._.path
to add a local directory to $PATH
, and then put little mini scripts in there for each of your commands. this would still involve the more-distributed configuration the OP doesn't like of course)
I would like to be able to specify
aliases
for built-in scripts in the mise configuration, so as not to specify the full path to them or parameters for launching:I know it's possible to create a
mise task
, but calling mise run seems like a longer command, especially when my script can also take many parameter and component arguments:If I understand correctly, you can use the
env._.source
directive and specify the path to the script (for examplealiases.sh
) in which all aliases will be declared.BUT I want to avoid spreading the project settings across several files, and keep everything in one configuration mise: