Permalink
Browse files

Bugfix: properly call "less -X" as default PAGER, thanks to lmarburge…

…r for the heads up.
  • Loading branch information...
wayneeseguin committed Nov 15, 2010
1 parent a5dfe49 commit 5ac6dd3a92984dca0a2e4f2d2ba798d3947dc3c5
Showing with 8 additions and 6 deletions.
  1. +3 −1 scripts/cli
  2. +4 −4 scripts/help
  3. +1 −1 scripts/list
View
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
-__rvm_usage() { ${PAGER:-"less -X"} "${rvm_path:-$HOME/.rvm}/README" ; }
+__rvm_usage() {
+ eval "${PAGER:-less -X} '${rvm_path:-$HOME/.rvm}/README'"
+}
__rvm_run_script()
{
View
@@ -15,23 +15,23 @@ args=(${args[@]})
action="${args[$array_start]}"
args[$__array_start]=""
args=(${args[@]})
-pager="${PAGER:-"less -X"}"
+pager="${PAGER:-less -X}"
if [[ -n "$command" && -s "${rvm_help_path}/${command}" ]] ; then
if [[ -n "$action" && -s "${rvm_help_path}/${command}/${action}" ]] ; then
- $pager "${rvm_help_path}/${command}/${action}"
+ eval "$pager '${rvm_help_path}/${command}/${action}'"
else
- $pager "${rvm_help_path}/${command}"
+ eval "$pager '${rvm_help_path}/${command}'"
fi
else
- $pager "${rvm_path:-$HOME/.rvm}/README"
+ eval "$pager '${rvm_path:-$HOME/.rvm}/README'"
"$rvm_path/scripts/log" "info" \
"Commands available with 'rvm help':\n\n $(builtin cd "${rvm_help_path}" ; find . -maxdepth 1 -mindepth 1 -type f -print | \tr "\n" ' ' | sed -e 's#./##g')"
View
@@ -204,7 +204,7 @@ list_known()
else
- ${PAGER:-"less -X"} "$rvm_path/config/known"
+ eval "${PAGER:-less -X} '$rvm_path/config/known'"
fi

0 comments on commit 5ac6dd3

Please sign in to comment.