Skip to content

Instantly share code, notes, and snippets.

@samsonw
Forked from drnic/$
Created June 23, 2011 08: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 samsonw/1042159 to your computer and use it in GitHub Desktop.
Save samsonw/1042159 to your computer and use it in GitHub Desktop.
never fear $ in tutorials again
#!/usr/bin/env bash
$@

Never fear tutorials again

Ever see example shell commands like this and wish you could paste them in?

$ rails new myapp
$ cd myapp
$ bundle

Fear no more.

cd ~
mkdir bin
git clone git://gist.github.com/1019041.git ~/bin/magic-dollar
chmod +x ~/bin/magic-dollar/$

In your .bash_profile add the following:

[[ -d $HOME/bin/magic-dollar ]] && export PATH=$PATH":$HOME/bin/magic-dollar"

Thanks

@dwaite for $@ instead of $0 $1 ...

$ rails new myapp
$ cd myapp
$ bundle
cd ~
mkdir bin
git clone git://gist.github.com/1019041.git ~/bin/magic-dollar
chmod +x ~/bin/magic-dollar/$
[[ -d $HOME/bin/magic-dollar ]] && export PATH=$PATH":$HOME/bin/magic-dollar"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment