From 5fb2f270094c26eac08fbdcf189db88fb6fa3582 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Wed, 25 Mar 2015 07:35:59 -0500 Subject: [PATCH] Add Where Are The Binaries as a zsh til. --- README.md | 1 + zsh/where-are-the-binaries.md | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 zsh/where-are-the-binaries.md diff --git a/README.md b/README.md index f6fe6e4..1ba99a0 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ smart people at [Hashrocket](http://hashrocket.com/). - [Clear The Screen](zsh/clear-the-screen.md) - [Search History](zsh/search-history.md) +- [Where Are The Binaries?](zsh/where-are-the-binaries.md) ## About diff --git a/zsh/where-are-the-binaries.md b/zsh/where-are-the-binaries.md new file mode 100644 index 0000000..7214eb6 --- /dev/null +++ b/zsh/where-are-the-binaries.md @@ -0,0 +1,21 @@ +# Where Are The Binaries? + +When I want to know where an executable is, I use `which` like so: + +``` +$ which rails +/Users/jbranchaud/.gem/ruby/2.1.4/bin/rails +``` + +That is the rails binary on my path that will be used if I enter a rails command. + +However, with something like rails, there may be multiple versions on your +path. If you want to know where all of them are, you can use `where`, like +so: + +``` +$ where rails +/Users/jbranchaud/.gem/ruby/2.1.4/bin/rails +/Users/jbranchaud/.rubies/2.1.4/bin/rails +/usr/bin/rails +```