diff --git a/help/list b/help/list index c877b64447..91518b3450 100644 --- a/help/list +++ b/help/list @@ -2,7 +2,7 @@ Show list of available rubies, ## Usage: - rvm list [help,known,remote [|rbx|jruby],gemsets,default [string],rubies,strings,known_strings,ruby_svn_tags] + rvm list [help,known,remote [|rbx|jruby|all],gemsets,default [string],rubies,strings,known_strings,ruby_svn_tags] ## Actions: @@ -11,7 +11,8 @@ Show list of available rubies, - `gemsets` - list all rubies with their gemsets - `rubies` - list installed rubies, it is the default action when none given - `strings` - list installed rubies, machine passable form -- `known_strings` - list known rubies, that can be installed, machine passable form -- `ruby_svn_tags` - list ruby tags available at http://svn.ruby-lang.org/repos/ruby/tags/ -- `default [string]` - show the default ruby, passable form with strings -- `remote [|rbx|jruby]` - list binary build rubies (also for rbx/jruby), they do not need compilation +- `known_strings` - list known rubies, that can be installed, machine passable form +- `ruby_svn_tags` - list ruby tags available at http://svn.ruby-lang.org/repos/ruby/tags/ +- `default [string]` - show the default ruby, passable form with strings +- `remote [|rbx|jruby|all]` - list binary build rubies (also for all/rbx/jruby), they do not need compilation, + when parameter omitted then only rvm build binaries are listed. diff --git a/scripts/functions/utility b/scripts/functions/utility index b96f04b428..342246ebc3 100644 --- a/scripts/functions/utility +++ b/scripts/functions/utility @@ -494,7 +494,7 @@ __rvm_system_path() else return $? fi if [[ "${1:-}" == "-" ]] - then printf "%b" "${rvm_remote_server_path}" + then printf "%b" "${rvm_remote_server_path}\n" fi } @@ -508,12 +508,12 @@ __rvm_system_path_for() rvm_remote_server_type="$(__rvm_db "rvm_remote_server_type${_iterator}")" [[ -n "${rvm_remote_server_type}" ]] || return 0 if - [[ "${rvm_remote_server_type}" == "$1" ]] + [[ "${rvm_remote_server_type}" == "$1" || "$1" == "all" ]] then __rvm_system_path - "${_iterator}" fi : $(( _iterator+=1 )) - done + done | sort -u | tr "\n" "|" | sed 's/|$//' } __rvm_remote_extension() @@ -600,6 +600,16 @@ __rvm_remote_server_path() done } +__list_remote_all_for() +{ + #TODO: read the list from db + { + __list_remote_rubies_for "$1" + __list_remote_rbx_for "$1" + __list_remote_jruby_for "$1" + } | sort -u +} + __list_remote_rubies_for() { typeset rvm_ruby_url