1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-08-06 05:49:25 +00:00

[Fix #259] Add ruby-info function

This commit is contained in:
Sorin Ionescu
2012-09-06 23:06:50 -04:00
parent eceef765b7
commit e5a9bdc4b4
2 changed files with 46 additions and 0 deletions

View File

@ -56,6 +56,24 @@ Aliases
- `rbbp` packages gem files into *vendor/cache*.
- `rbbu` updates gems to their latest version.
Functions
---------
- `ruby-info` exposes information about the Ruby environment via the
`$ruby_info` associative array.
Theming
-------
To display the name of the current Ruby version in a prompt, define the
following style in the `prompt_theme_setup` function.
# %v - ruby version.
zstyle ':prezto:module:ruby' version 'version:%v'
Then add `$ruby_info[version]` to `$PROMPT` or `$RPROMPT` and call
`ruby-info` in the `prompt_theme_preexec` hook function.
Authors
-------