mirror of https://github.com/ohmyzsh/ohmyzsh.git
Compare commits
4 Commits
1339d45c64
...
9baaf9d3c7
Author | SHA1 | Date |
---|---|---|
|
9baaf9d3c7 | |
|
cae2e45193 | |
|
276e540eed | |
|
0f1294812d |
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
function omz {
|
||||
setopt localoptions noksharrays
|
||||
[[ $# -gt 0 ]] || {
|
||||
_omz::help
|
||||
return 1
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
The primary job of this plugin is to provide `rbenv_prompt_info` which can be added to your theme to include Ruby
|
||||
version and gemset information into your prompt.
|
||||
|
||||
Additionally, this plugin provides completion for the `rbenv` command. See also <https://github.com/rbenv/rbenv/#shell-completions>.
|
||||
|
||||
Some functionality of this plugin will not work unless you also have the rbenv plugin *gemset* installed.
|
||||
https://github.com/jf/rbenv-gemset
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# the 'rbenv_prompt_info' function.
|
||||
|
||||
FOUND_RBENV=$+commands[rbenv]
|
||||
RBENV_ROOT=''
|
||||
|
||||
if [[ $FOUND_RBENV -ne 1 ]]; then
|
||||
rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" "/usr/local/opt/rbenv")
|
||||
|
@ -9,6 +10,7 @@ if [[ $FOUND_RBENV -ne 1 ]]; then
|
|||
if [[ -d $dir/bin ]]; then
|
||||
export PATH="$dir/bin:$PATH"
|
||||
FOUND_RBENV=1
|
||||
RBENV_ROOT="$dir"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
@ -24,6 +26,10 @@ if [[ $FOUND_RBENV -ne 1 ]]; then
|
|||
fi
|
||||
|
||||
if [[ $FOUND_RBENV -eq 1 ]]; then
|
||||
if [[ -d "$RBENV_ROOT/completions" ]]; then
|
||||
fpath+=("$RBENV_ROOT/completions")
|
||||
fi
|
||||
|
||||
eval "$(rbenv init --no-rehash - zsh)"
|
||||
|
||||
alias rubies="rbenv versions"
|
||||
|
|
|
@ -22,5 +22,5 @@ fi
|
|||
rustup completions zsh >| "$ZSH_CACHE_DIR/completions/_rustup" &|
|
||||
cat >| "$ZSH_CACHE_DIR/completions/_cargo" <<'EOF'
|
||||
#compdef cargo
|
||||
source "$(rustc +${${(z)$(rustup default)}[1]} --print sysroot)"/share/zsh/site-functions/_cargo
|
||||
source "$(rustup run ${${(z)$(rustup default)}[1]} rustc --print sysroot)"/share/zsh/site-functions/_cargo
|
||||
EOF
|
||||
|
|
Loading…
Reference in New Issue