b5583a321644218702c4ef588934575f46a2159b
- Author
- Jared Allard <jaredallard@users.noreply.github.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/plugins/mise/README.md b/plugins/mise/README.md
2new file mode 100644
3index 0000000000000000000000000000000000000000..8ec05aab99bdf3df3126feccc711129f77fe2ee3
4--- /dev/null
5+++ b/plugins/mise/README.md
6@@ -0,0 +1,32 @@
7+# mise
8+
9+Adds integration with [mise](https://github.com/jdx/mise) (formerly `rtx`), a runtime executor compatible with
10+npm, nodenv, pyenv, etc. mise is written in rust and is very fast. 20x-200x faster than asdf. With that being
11+said, mise is compatible with asdf plugins and .tool-versions files. It can be used as a drop-in replacement.
12+
13+## Installation
14+
15+1. [Download & install mise](https://github.com/jdx/mise#installation) by running the following:
16+
17+```bash
18+curl https://mise.jdx.dev/install.sh | sh
19+```
20+
21+2. [Enable mise](https://github.com/jdx/mise#quickstart) by adding it to your `plugins` definition in
22+ `~/.zshrc`.
23+
24+```bash
25+plugins=(mise)
26+```
27+
28+## Usage
29+
30+See the [mise readme](https://github.com/jdx/mise#table-of-contents) for information on how to use mise. Here
31+are a few examples:
32+
33+```bash
34+mise install node Install the current version specified in .tool-versions/.mise.toml
35+mise use -g node@system Use system node as global default
36+mise install node@20.0.0 Install a specific version number
37+mise use -g node@20 Use node-20.x as global default
38+```
39diff --git a/plugins/mise/mise.plugin.zsh b/plugins/mise/mise.plugin.zsh
40new file mode 100644
41index 0000000000000000000000000000000000000000..1b4d3ae8134e32f12b409ebca0274fb5a2c77961
42--- /dev/null
43+++ b/plugins/mise/mise.plugin.zsh
44@@ -0,0 +1,23 @@
45+# TODO: 2024-01-03 remove rtx support
46+local __mise=mise
47+if (( ! $+commands[mise] )); then
48+ if (( $+commands[rtx] )); then
49+ __mise=rtx
50+ else
51+ return
52+ fi
53+fi
54+
55+# Load mise hooks
56+eval "$($__mise activate zsh)"
57+
58+# If the completion file doesn't exist yet, we need to autoload it and
59+# bind it to `mise`. Otherwise, compinit will have already done that.
60+if [[ ! -f "$ZSH_CACHE_DIR/completions/_$__mise" ]]; then
61+ typeset -g -A _comps
62+ autoload -Uz _$__mise
63+ _comps[$__mise]=_$__mise
64+fi
65+
66+# Generate and load mise completion
67+$__mise completion zsh >| "$ZSH_CACHE_DIR/completions/_$__mise" &|
68diff --git a/plugins/rtx/README.md b/plugins/rtx/README.md
69deleted file mode 100644
70index c6436d3a7fb0fe62ac9f7187b4ff3dc371df183d..0000000000000000000000000000000000000000
71--- a/plugins/rtx/README.md
72+++ /dev/null
73@@ -1,30 +0,0 @@
74-## rtx
75-
76-
77diff --git a/plugins/rtx/rtx.plugin.zsh b/plugins/rtx/rtx.plugin.zsh
78index a01828afd48eb5337c4d228a0307e531af2e7e17..43127a25f66d9944030a78f50f0e4cda76fff8e6 100644
79--- a/plugins/rtx/rtx.plugin.zsh
80+++ b/plugins/rtx/rtx.plugin.zsh
81@@ -1,18 +1,2 @@
82-# rtx needs to be in $PATH
83-if (( ! ${+commands[rtx]} )); then
84- return
85-fi
86-
87-# Load rtx hooks
88-eval "$(rtx activate zsh)"
89-
90-# If the completion file doesn't exist yet, we need to autoload it and
91-# bind it to `rtx`. Otherwise, compinit will have already done that.
92-if [[ ! -f "$ZSH_CACHE_DIR/completions/_rtx" ]]; then
93- typeset -g -A _comps
94- autoload -Uz _rtx
95- _comps[rtx]=_rtx
96-fi
97-
98-# Generate and load rtx completion
99-rtx completion zsh >! "$ZSH_CACHE_DIR/completions/_rtx" &|
100+# TODO: 2024-01-03 remove rtx support
101+echo "[oh-my-zsh] 'rtx' plugin has been renamed to 'mise'"