My best attempt right now:

`rbenv-version`:

```
  1 #!/usr/bin/env bash
  2 # Summary: Show the current Ruby version and its origin
  3 #
  4 # Shows the currently selected Ruby version and how it was
  5 # selected. To obtain only the version string, use `rbenv
  6 # version-name'.
  7 
  8 [ -n "$RBENV_DEBUG" ] && set -x
  9 
 10 version_origin=$(rbenv-version-origin)
 11 origin_status=$?
 12 set -e
 13 if [ "$origin_status" = "0" ]; then
 14   echo "$(rbenv-version-name) (set by $version_origin)"
 15 else
 16   echo "$(rbenv-version-name)"' (set the global version with: `rbenv global VERSION`)'
 17 fi
```

(so only do the `set -e` *after* the call to `rbenv-version-origin`!)