Skip to content
This repository has been archived by the owner on May 29, 2020. It is now read-only.

Commit

Permalink
Made ksh portability changes
Browse files Browse the repository at this point in the history
Added specific message for ksh in identifying the proper shell
initialization file.

Changed rbenv functiond definition to be more portable.
Shell functions should be defined by using the function command or
using the parenthesis grammar, but using both is not portable:

rbenv() {...  -or-
function rbenv { ...
  • Loading branch information
mgrubb committed Dec 15, 2011
1 parent adf9c97 commit 7e83e07
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libexec/rbenv-init
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ if [ -z "$print" ]; then
zsh )
profile='~/.zshrc'
;;
ksh )
profile='~/.profile'
;;
* )
profile='your profile'
;;
Expand Down Expand Up @@ -71,7 +74,7 @@ echo 'rbenv rehash 2>/dev/null'
commands=(`rbenv commands --sh`)
IFS="|"
cat <<EOS
function rbenv() {
function rbenv {
command="\$1"
if [ "\$#" -gt 0 ]; then
shift
Expand Down

0 comments on commit 7e83e07

Please sign in to comment.