Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a ry system command

Add a ry system command to switch back to the version system since it's
simpler than remove the symlink in the lib folder under RY_PREFIX.
  • Loading branch information...
commit 0b8bf8c3ebe18264bb68c729127e89dd55361bf7 1 parent 303b789
@robin850 robin850 authored
Showing with 13 additions and 1 deletion.
  1. +10 −0 bin/ry
  2. +1 −0  lib/ry.bash_completion
  3. +2 −1  lib/ry.zsh_completion
View
10 bin/ry
@@ -310,6 +310,14 @@ ry::remove() {
ry::rm() { ry::remove "$@" ;}
#
+# ry system
+# Fallback to the default system version
+#
+ry::system() {
+ rm -f "$RY_LIB/current"
+}
+
+#
# Output usage information.
#
ry::usage() {
@@ -350,6 +358,8 @@ ry::usage() {
includes the given ruby's path.
If no name is given, uses the \`current\` symlink
+ ry system Fallback to the default system version
+
Options:
View
1  lib/ry.bash_completion
@@ -19,6 +19,7 @@ __complete_ry() {
echo remove
echo rm
echo usage
+ echo system
)"
else
local command="${COMP_WORDS[1]}"
View
3  lib/ry.zsh_completion
@@ -11,7 +11,7 @@ if (( CURRENT > 2 )); then
local subcmd="$words[1]"
case $subcmd in
- setup|use|remove|rm|exec|binpath|fullpath)
+ setup|use|remove|rm|exec|binpath|fullpath|system)
rubies=($(_call_program rubies ry ls))
;;
install)
@@ -41,6 +41,7 @@ else
exec:'execute a command in the context of each comma-separated ruby'
binpath:'print the bin directory for the given ruby'
fullpath:'print a modified version of $PATH that exclusively includes the given ruby'
+ system:'fallback to the default system version'
)
rubies=($(_call_program rubies ry ls))
_describe commands commands
Please sign in to comment.
Something went wrong with that request. Please try again.