Skip to content

Instantly share code, notes, and snippets.

@dblack
Created November 15, 2010 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dblack/676307 to your computer and use it in GitHub Desktop.
Save dblack/676307 to your computer and use it in GitHub Desktop.
1. Without the change to line 7 of scripts/rvm:
$ rvm default
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i386-darwin9.8.0]
$ sh
sh: /Users/dblack/.rvm/scripts/rvm: line 7: syntax error near unexpected token
`<'
sh: /Users/dblack/.rvm/scripts/rvm: line 7: `\grep -q '^rvm ()' < <( declare -f
) # Is RVM is a shell function?'
sh-3.2$ ruby -v
ruby 1.8.7 (2008-05-31 patchlevel 0) [i686-darwin9.8.0]
2. With the change to line 7:
$ rvm default
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i386-darwin9.8.0]
$ sh
sh-3.2$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i386-darwin9.8.0]
3. And the change is...
declare -f | grep -q '^rvm ()' # Is RVM a shell function?
(Erroneous repetition of the word "is" removed for free! :-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment