| ... | ... |
@@ -1,9 +1,9 @@ |
| 1 |
+#!/bin/zsh |
|
| 2 |
+ |
|
| 3 |
+# Push and pop directories on directory stack |
|
| 1 | 4 |
alias pu='pushd' |
| 2 | 5 |
alias po='popd' |
| 3 | 6 |
|
| 4 |
-alias sc='ruby script/console' |
|
| 5 |
-alias sdb='ruby script/dbconsole' |
|
| 6 |
-alias ssd='ruby script/server --debugger' |
|
| 7 | 7 |
alias ss='thin --stats "/thin/stats" start' |
| 8 | 8 |
alias sg='ruby script/generate' |
| 9 | 9 |
alias sd='ruby script/destroy' |
| ... | ... |
@@ -11,16 +11,18 @@ alias sp='ruby script/plugin' |
| 11 | 11 |
alias ssp='ruby script/spec' |
| 12 | 12 |
alias rdbm='rake db:migrate' |
| 13 | 13 |
|
| 14 |
-alias mr='mate CHANGELOG app config db lib public script spec test' |
|
| 14 |
+# Basic directory operations |
|
| 15 | 15 |
alias .='pwd' |
| 16 | 16 |
alias ...='cd ../..' |
| 17 | 17 |
alias -- -='cd -' |
| 18 | 18 |
|
| 19 |
+# Super user |
|
| 19 | 20 |
alias _='sudo' |
| 20 | 21 |
alias ss='sudo su -' |
| 21 | 22 |
|
| 22 | 23 |
#alias g='grep -in' |
| 23 | 24 |
|
| 25 |
+# Git related |
|
| 24 | 26 |
alias g='git' |
| 25 | 27 |
alias gst='git status' |
| 26 | 28 |
alias gl='git pull' |
| ... | ... |
@@ -36,23 +38,39 @@ alias gdb='git branch -d' |
| 36 | 36 |
alias gcount='git shortlog -sn' |
| 37 | 37 |
alias gcp='git cherry-pick' |
| 38 | 38 |
|
| 39 |
+# Show history |
|
| 39 | 40 |
alias history='fc -l 1' |
| 40 | 41 |
|
| 42 |
+# List direcory contents |
|
| 41 | 43 |
alias ls='ls -F' |
| 42 | 44 |
alias lsa='ls -lahG' |
| 45 |
+alias l='ls -la' |
|
| 43 | 46 |
alias ll='ls -alr' |
| 44 |
-alias l='ls' |
|
| 45 |
-alias ll='ls -l' |
|
| 46 | 47 |
alias sl=ls # often screw this up |
| 47 | 48 |
|
| 48 | 49 |
alias sgem='sudo gem' |
| 49 | 50 |
|
| 51 |
+# Find ruby file |
|
| 50 | 52 |
alias rfind='find . -name *.rb | xargs grep -n' |
| 51 | 53 |
alias afind='ack-grep -il' |
| 52 | 54 |
|
| 55 |
+# Git and svn mix |
|
| 53 | 56 |
alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk' |
| 54 | 57 |
|
| 58 |
+# TextMate |
|
| 55 | 59 |
alias et='mate . &' |
| 56 | 60 |
alias ett='mate app config lib db public spec test Rakefile Capfile Todo &' |
| 57 | 61 |
alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' |
| 58 | 62 |
alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' |
| 63 |
+<<<<<<< HEAD:lib/aliases.zsh |
|
| 64 |
+======= |
|
| 65 |
+ |
|
| 66 |
+## Ruby related |
|
| 67 |
+# Ruby scripts |
|
| 68 |
+alias sc='ruby script/console' |
|
| 69 |
+alias sd='ruby script/server --debugger' |
|
| 70 |
+ |
|
| 71 |
+# Editor Ruby file in TextMate |
|
| 72 |
+alias mr='mate CHANGELOG app config db lib public script spec test' |
|
| 73 |
+ |
|
| 74 |
+>>>>>>> 886d97f41e72b8662232a2c6b196fb60508e4f67:lib/aliases.zsh |
| ... | ... |
@@ -37,8 +37,7 @@ zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z- |
| 37 | 37 |
zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm -w -w" |
| 38 | 38 |
zstyle ':completion:*:*:(ssh|scp):*:*' hosts `sed 's/^\([^ ,]*\).*$/\1/' ~/.ssh/known_hosts` |
| 39 | 39 |
|
| 40 |
- |
|
| 41 |
-#complete on history |
|
| 40 |
+# Complete on history |
|
| 42 | 41 |
# zstyle ':completion:*:history-words' stop yes |
| 43 | 42 |
# zstyle ':completion:*:history-words' remove-all-dups yes |
| 44 | 43 |
# zstyle ':completion:*:history-words' list false |
| 45 | 44 |
old mode 100644 |
| 46 | 45 |
new mode 100755 |
| ... | ... |
@@ -2,11 +2,11 @@ if [ -d ~/.oh-my-zsh ] |
| 2 | 2 |
then |
| 3 | 3 |
echo "You already have Oh My Zsh installed. You'll need to remove ~/.oh-my-zsh if you want to install" |
| 4 | 4 |
exit |
| 5 |
-else |
|
| 6 |
- echo "Cloning Oh My Zsh..." |
|
| 7 |
- /usr/bin/env git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh |
|
| 8 | 5 |
fi |
| 9 | 6 |
|
| 7 |
+echo "Cloning Oh My Zsh..." |
|
| 8 |
+/usr/bin/env git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh |
|
| 9 |
+ |
|
| 10 | 10 |
echo "Looking for an existing zsh config..." |
| 11 | 11 |
if [ -f ~/.zshrc ] || [ -h ~/.zshrc ] |
| 12 | 12 |
then |
| ... | ... |
@@ -27,4 +27,3 @@ chsh -s /bin/zsh |
| 27 | 27 |
echo "Hooray! Oh My Zsh has been installed." |
| 28 | 28 |
/bin/zsh |
| 29 | 29 |
source ~/.zshrc |
| 30 |
- |