Cross-shell aliases #3551
Replies: 7 comments
-
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. |
Beta Was this translation helpful? Give feedback.
-
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!) |
Beta Was this translation helpful? Give feedback.
-
yeah it could go there too |
Beta Was this translation helpful? Give feedback.
-
(re the OP #2034 (comment) I think |
Beta Was this translation helpful? Give feedback.
-
It will be great to have such feature! |
Beta Was this translation helpful? Give feedback.
-
I would like to see this happen 🙏 |
Beta Was this translation helpful? Give feedback.
-
until this is a feature, I'm using this, which is "ugly" but works: [env]
_.path = [
"{{ vars.mise_bin_dir }}",
]
[vars]
mise_bin_dir = "{{ config_root }}/.mise_bin"
[hooks]
enter = "mise run build-mise-bin"
[tasks.build-mise-bin]
hide = true
silent = true
run = """
rm -rf {{ vars.mise_bin_dir }}
mkdir -p {{ vars.mise_bin_dir }}
echo 'bazelisk $@' > {{ vars.mise_bin_dir }}/bazel
chmod +x {{ vars.mise_bin_dir }}/bazel
""" |
Beta Was this translation helpful? Give feedback.
-
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:
Beta Was this translation helpful? Give feedback.
All reactions