iTranslated by AI
The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🧐
A Quick Guide to mise for prezto Users
I recently started using mise[1], so I'd like to introduce it. Between "make is outdated" and "project-specific dependency tools being too heavy," there were various reasons why I followed a project member's recommendation and started using mise. So far, I'm liking it.
This article is simply about how "it's convenient when tasks appear in autocompletion, so you should run mise completion."
Prerequisites
- Ubuntu 22.04 LTS
- zsh + prezto[2] already installed
- Environment following XDG Base Directory[3] (e.g.,
~/.config,~/.local)
Installation
Installing mise
curl https://mise.run | sh
By default, it is installed in ~/.local/bin/mise.
Activation Settings
Add to ~/.zshrc (after prezto initialization):
# mise
eval "$(mise activate zsh)"
Restart the shell:
exec zsh
Installing the usage CLI (👍)
The usage CLI is mandatory for mise completions.
mise use -g usage
prezto completion settings
Placing completion scripts
mkdir -p ~/.zprezto/modules/completion/external/src
mise completion zsh > ~/.zprezto/modules/completion/external/src/_mise
Clearing the cache
rm -f ~/.zcompdump
rm -rf ~/.cache/prezto/*
Restarting the shell
exec zsh
Verification
# Testing completion
mise <Tab>
# Installing and verifying tools
mise use --global node@20
mise ls
# Verifying the path
which node
# → ~/.local/share/mise/installs/node/20.x.x/bin/node
Troubleshooting
Error: usage CLI not found
mise use -g usage
If completion is not working
# Verifying usage CLI
which usage
# Checking mise status
mise doctor
# Manually re-running compinit
autoload -Uz compinit && compinit
Basic usage of mise
# Install globally
mise use --global node@20 python@3.12
# Project-specific settings
cd my-project
mise use node@18
# Verify installed tools
mise ls
# Uninstall tools
mise uninstall node@18
Supplements
- mise installs tools in
~/.local/share/mise - Configuration files are saved in
~/.config/mise/config.toml - The usage[4] CLI is required to dynamically generate mise completions
Discussion