mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 07:06:40 +00:00
chore(rtx): install via official script instead of zinit
A bit more code, but should make installation more reliable, as zinit often has issues detecting the correct binary/tarball to download from GitHub releases.
This commit is contained in:
2
zshenv
2
zshenv
@@ -200,13 +200,13 @@ if command-exists sccache; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# rtx setup
|
# rtx setup
|
||||||
|
path_prepend "$HOME/.local/share/rtx/bin"
|
||||||
path_prepend "$HOME/.local/share/rtx/shims"
|
path_prepend "$HOME/.local/share/rtx/shims"
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# Path setup for select binaries installed with zinit
|
# Path setup for select binaries installed with zinit
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
||||||
path_prepend "$HOME/.local/zsh/zinit/plugins/jdxcode---rtx"
|
|
||||||
path_prepend "$HOME/.local/zsh/zinit/plugins/junegunn---fzf"
|
path_prepend "$HOME/.local/zsh/zinit/plugins/junegunn---fzf"
|
||||||
path_prepend "$HOME/.local/zsh/zinit/plugins/rbenv---rbenv/bin"
|
path_prepend "$HOME/.local/zsh/zinit/plugins/rbenv---rbenv/bin"
|
||||||
|
|
||||||
|
|||||||
24
zshrc
24
zshrc
@@ -93,10 +93,26 @@ if command-exists direnv; then
|
|||||||
eval "$(direnv hook zsh)"
|
eval "$(direnv hook zsh)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
zinit light-mode wait lucid from'gh-r' as'program' pick'rtx' mv'rtx* -> rtx' \
|
RTX_HOME="$HOME/.local/share/rtx"
|
||||||
atclone'./rtx completion zsh > _rtx && chmod +x _rtx && ./rtx activate zsh > .rtx.zsh && zinit creinstall jdxcode/rtx' \
|
RTX_INIT="$RTX_HOME/shell/init.zsh"
|
||||||
atpull'%atclone' src='.rtx.zsh' \
|
export RTX_INSTALL_PATH="$RTX_HOME/bin/rtx"
|
||||||
for @jdxcode/rtx
|
|
||||||
|
if ! command-exists rtx; then
|
||||||
|
read -q 'REPLY?rtx is not installed, install with curl `https://rtx.pub/install.sh | sh`? [y/N]:' &&
|
||||||
|
echo && curl https://rtx.pub/install.sh | sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$HOME/.local/share/rtx/bin/rtx" ]; then
|
||||||
|
path_prepend "$RTX_HOME/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command-exists rtx; then
|
||||||
|
if [ ! -f "$RTX_INIT" ] || [ "$RTX_INIT" -ot "$RTX_INSTALL_PATH" ]; then
|
||||||
|
mkdir -p "$(dirname "$RTX_INIT")"
|
||||||
|
rtx activate zsh > "$RTX_INIT"
|
||||||
|
fi
|
||||||
|
source "$RTX_INIT"
|
||||||
|
fi
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# Prompt
|
# Prompt
|
||||||
|
|||||||
Reference in New Issue
Block a user