瀏覽代碼

Better error message for `rbenv shell`

Shell integration is not enabled by default. This means that, from all the
commands from `rbenv commands`, only "shell" won't work right away.

Replace "no such command" with a more descriptive message that points to
`rbenv init` instead.
pull/1133/head
Marco Hinz 9 年之前
父節點
當前提交
af53c790cc
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 1C980A1B657B4A4F
共有 1 個檔案被更改,包括 7 行新增1 行删除
  1. +7
    -1
      libexec/rbenv

+ 7
- 1
libexec/rbenv 查看文件

@ -106,7 +106,13 @@ case "$command" in
;;
* )
command_path="$(command -v "rbenv-$command" || true)"
[ -n "$command_path" ] || abort "no such command \`$command'"
if [ -z "$command_path" ]; then
if [ "$command" == "shell" ]; then
abort "shell integration not enabled. Run \`rbenv init' for instructions."
else
abort "no such command \`$command'"
fi
fi
shift 1
if [ "$1" = --help ]; then

Loading…
取消
儲存