Commit 68a0a44c87f63257a03c76bc6eec59276e2f2dd9
- Date: Thu Apr 17 16:10:47 +0000 2008
- Committer: Inge Jørgensen (inge@elektronaut.no)
- Author: Inge Jørgensen (inge@elektronaut.no)
- Commit SHA1: 68a0a44c87f63257a03c76bc6eec59276e2f2dd9
- Tree SHA1: 89f69c092603a85b6278ca109e5d809424602dd2
Let's support both /usr/bin/mate and /usr/local/bin/mate
Commit diff
| |   |
| 5 | 5 | set PATH ~/.config/fish/bin $PATH |
| 6 | 6 | end |
| 7 | 7 | |
| 8 | | set -x EDITOR "/usr/local/bin/mate -w" |
| 8 | # Textmate defaults to /usr/bin/mate, but let's check for /usr/local/bin/mate |
| 9 | if test -f "/usr/local/bin/mate" |
| 10 | set -x EDITOR "/usr/local/bin/mate -w" |
| 11 | else |
| 12 | set -x EDITOR "/usr/bin/mate -w" |
| 13 | end |
| 14 | |
| 9 | 15 | set fish_greeting "" |
| 10 | 16 | |
| 11 | 17 | function parse_git_branch |
| … | … | |
| 59 | 59 | function sc -d "Run the Rails console" |
| 60 | 60 | script/console |
| 61 | 61 | end |
| 62 | |
| toggle raw diff |
--- a/config.fish
+++ b/config.fish
@@ -5,7 +5,13 @@ if test -d ~/.config/fish/bin
set PATH ~/.config/fish/bin $PATH
end
-set -x EDITOR "/usr/local/bin/mate -w"
+# Textmate defaults to /usr/bin/mate, but let's check for /usr/local/bin/mate
+if test -f "/usr/local/bin/mate"
+ set -x EDITOR "/usr/local/bin/mate -w"
+else
+ set -x EDITOR "/usr/bin/mate -w"
+end
+
set fish_greeting ""
function parse_git_branch
@@ -53,3 +59,4 @@ end
function sc -d "Run the Rails console"
script/console
end
+ |