Skip to content

Commit 7ce2069

Browse files
authored
Add shell completion to mise (#7)
1 parent 3acd2d8 commit 7ce2069

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/mise/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Mise",
33
"id": "mise",
4-
"version": "0.9.0",
4+
"version": "0.9.9",
55
"description": "Mise is a polyglot tool version manager. It replaces tools like asdf, nvm, pyenv, rbenv, etc.",
66
"options": {},
77
"dependsOn": {

src/mise/install.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ echo 'eval "$(mise activate bash)"' >> "${_REMOTE_USER_HOME}/.bashrc"
2626
echo 'eval "$(mise activate zsh)"' >> "${_REMOTE_USER_HOME}/.zshrc"
2727
mkdir -p /etc/fish/conf.d/ && echo 'mise activate fish | source' >> /etc/fish/conf.d/mise.fish
2828

29-
# TODO: add shell completions
30-
# USAGE_VERSION="latest" # But for mise tool spec we need string "latest"
31-
# mise install "usage@${USAGE_VERSION}"
32-
# usage_binary=(mise which usage --tool="usage@${USAGE_VERSION}")
33-
# cp "${usage_binary}" ${INSTALL_PATH}
34-
# mise completion fish > /etc/fish/completions/mise.fish
35-
36-
chown -R $_REMOTE_USER $OPT_PATH
29+
mise install usage
30+
mkdir -p /usr/share/bash-completion/completions/ && mise completions zsh > /usr/share/bash-completion/completions/mise
31+
mkdir -p /usr/share/zsh/vendor-completions/ && mise completions zsh > /usr/share/zsh/vendor-completions/_mise
32+
mkdir -p /etc/fish/completions/ && mise completion fish > /etc/fish/completions/mise.fish
33+
34+
chown -R "${_REMOTE_USER}" "${OPT_PATH}"

0 commit comments

Comments
 (0)