Compare commits

...

3 Commits

Author SHA1 Message Date
Masafumi Koba 1aed6ac1ce
Merge 0f1294812d into 6e9cda3d30 2025-01-22 12:17:35 +01:00
dependabot[bot] 6e9cda3d30
chore(deps): bump semver in /.github/workflows/dependencies (#12924)
Bumps [semver](https://github.com/python-semver/python-semver) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/python-semver/python-semver/releases)
- [Changelog](https://github.com/python-semver/python-semver/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/python-semver/python-semver/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-19 23:30:40 +01:00
Masafumi Koba 0f1294812d
feat(rbenv): provide completion for `rbenv` command
Ref https://github.com/rbenv/rbenv/#shell-completions
2025-01-06 10:47:00 +09:00
3 changed files with 9 additions and 1 deletions

View File

@ -3,5 +3,5 @@ charset-normalizer==3.4.1
idna==3.10 idna==3.10
PyYAML==6.0.2 PyYAML==6.0.2
requests==2.32.3 requests==2.32.3
semver==3.0.2 semver==3.0.3
urllib3==2.3.0 urllib3==2.3.0

View File

@ -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 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. 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. Some functionality of this plugin will not work unless you also have the rbenv plugin *gemset* installed.
https://github.com/jf/rbenv-gemset https://github.com/jf/rbenv-gemset

View File

@ -2,6 +2,7 @@
# the 'rbenv_prompt_info' function. # the 'rbenv_prompt_info' function.
FOUND_RBENV=$+commands[rbenv] FOUND_RBENV=$+commands[rbenv]
RBENV_ROOT=''
if [[ $FOUND_RBENV -ne 1 ]]; then if [[ $FOUND_RBENV -ne 1 ]]; then
rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" "/usr/local/opt/rbenv") 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 if [[ -d $dir/bin ]]; then
export PATH="$dir/bin:$PATH" export PATH="$dir/bin:$PATH"
FOUND_RBENV=1 FOUND_RBENV=1
RBENV_ROOT="$dir"
break break
fi fi
done done
@ -24,6 +26,10 @@ if [[ $FOUND_RBENV -ne 1 ]]; then
fi fi
if [[ $FOUND_RBENV -eq 1 ]]; then if [[ $FOUND_RBENV -eq 1 ]]; then
if [[ -d "$RBENV_ROOT/completions" ]]; then
fpath+=("$RBENV_ROOT/completions")
fi
eval "$(rbenv init --no-rehash - zsh)" eval "$(rbenv init --no-rehash - zsh)"
alias rubies="rbenv versions" alias rubies="rbenv versions"