summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2009-08-31 15:09:34 -0700
committerRobby Russell <robby@planetargon.com>2009-08-31 15:09:34 -0700
commit09e2193ae6a4ec64290e2a9be2ec54179f6e3b5b (patch)
treec8cdebcfee0c3bd67bb01ac241fe2c732546cd13
parente1f5c0c703c60d473144f58e1ab49d51c38ab526 (diff)
parentaf8294d2068e3614a7635486de1d89e12e23a8e5 (diff)
downloadzsh-09e2193ae6a4ec64290e2a9be2ec54179f6e3b5b.tar.gz
zsh-09e2193ae6a4ec64290e2a9be2ec54179f6e3b5b.tar.bz2
zsh-09e2193ae6a4ec64290e2a9be2ec54179f6e3b5b.zip
Merging geoffgarside work
-rw-r--r--aliases.zsh18
-rw-r--r--functions.zsh24
-rw-r--r--git.zsh4
-rw-r--r--prompt.zsh2
-rw-r--r--themes/geoffgarside.zsh-theme2
-rw-r--r--zshrc4
6 files changed, 44 insertions, 10 deletions
diff --git a/aliases.zsh b/aliases.zsh
index 5cf253dc5..e27cd0366 100644
--- a/aliases.zsh
+++ b/aliases.zsh
@@ -2,7 +2,8 @@ alias pu='pushd'
alias po='popd'
alias sc='ruby script/console'
-alias ss='ruby script/server'
+alias sd='ruby script/server --debugger'
+alias ss='thin --stats "/thin/stats" start'
alias mr='mate CHANGELOG app config db lib public script spec test'
alias .='pwd'
@@ -10,11 +11,12 @@ alias ...='cd ../..'
alias _='sudo'
-alias g='grep -in'
+#alias g='grep -in'
+alias g='git'
alias history='fc -l 1'
-alias ls='ls -GF'
+alias ls='ls -F'
alias ll='ls -al'
alias sgem='sudo gem'
@@ -26,4 +28,12 @@ alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
bindkey '\ew' kill-region
bindkey -s '\el' "ls\n"
-bindkey -s '\e.' "..\n" \ No newline at end of file
+bindkey -s '\e.' "..\n"
+
+alias et='mate . &'
+alias ett='mate app config lib db public spec test Rakefile Capfile Todo &'
+alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Rakefile Capfile Todo &'
+alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo &'
+
+bindkey "^[[A" history-beginning-search-backward
+bindkey "^[[B" history-beginning-search-forward
diff --git a/functions.zsh b/functions.zsh
index 2ce91c964..d0c24e9e9 100644
--- a/functions.zsh
+++ b/functions.zsh
@@ -30,4 +30,26 @@ function zsh_stats() {
function uninstall_oh_my_zsh() {
/bin/sh $ZSH/tools/uninstall.sh
-} \ No newline at end of file
+}
+
+function tab() {
+ osascript 2>/dev/null <<EOF
+ tell application "System Events"
+ tell process "Terminal" to keystroke "t" using command down
+ end
+ tell application "Terminal"
+ activate
+ do script with command "cd $PWD; $*" in window 1
+ end tell
+EOF
+}
+
+function take() {
+ mkdir -p $1
+ cd $1
+}
+
+function tm() {
+ cd $1
+ mate $1
+}
diff --git a/git.zsh b/git.zsh
index 567c2faa2..b8fd1f08e 100644
--- a/git.zsh
+++ b/git.zsh
@@ -3,7 +3,7 @@ function git_prompt_info() {
if [[ -d .git ]]; then
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
branch=${ref#refs/heads/}
- CURRENT_BRANCH="%{$fg[red]%}git:(%{$fg[green]${branch}%{$fg[red])"
+ CURRENT_BRANCH="git:(%{$fg[red]%}${branch}%{$fg[blue]%})%{$reset_color%}$(parse_git_dirty)"
else
CURRENT_BRANCH=''
fi
@@ -12,5 +12,5 @@ function git_prompt_info() {
}
parse_git_dirty () {
- [[ $(git status | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "%{$fg[white] ♻ "
+ [[ $(git status | tail -n1) != "nothing to commit (working directory clean)" ]] && echo " %{$fg[yellow]%}✗%{$reset_color%}"
}
diff --git a/prompt.zsh b/prompt.zsh
index d6c35a652..31c33feb5 100644
--- a/prompt.zsh
+++ b/prompt.zsh
@@ -29,4 +29,4 @@ setopt prompt_subst
export LSCOLORS="Gxfxcxdxbxegedabagacad"
-source "$ZSH/themes/$ZSH_THEME.zsh-theme" \ No newline at end of file
+source "$ZSH/themes/$ZSH_THEME.zsh-theme"
diff --git a/themes/geoffgarside.zsh-theme b/themes/geoffgarside.zsh-theme
new file mode 100644
index 000000000..38733d95c
--- /dev/null
+++ b/themes/geoffgarside.zsh-theme
@@ -0,0 +1,2 @@
+# PROMPT="[%*] %n:%c $(git_prompt_info)%(!.#.$) "
+PROMPT='[%*] %{$fg[cyan]%}%n%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$(git_prompt_info) %(!.#.$) '
diff --git a/zshrc b/zshrc
index e2f5fbad6..39e2406f7 100644
--- a/zshrc
+++ b/zshrc
@@ -4,12 +4,12 @@ export ZSH=$HOME/.oh-my-zsh
# Set to the name theme to load.
# Look in ~/.oh-my-zsh/themes/
export ZSH_THEME="robbyrussell"
+# export ZSH_THEME="geoffgarside"
# Load all of the config files in ~/oh-my-zsh that end in .zsh
# TIP: Add files you don't want in git to .gitignore
for i in $ZSH/*zsh; do source $i; done;
# Customize to your needs...
-export PATH=~/bin:/opt/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/sbin:/opt/local/lib/postgresql83/bin
-
+#export PATH=~/bin:/opt/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/sbin:/opt/local/lib/postgresql83/bin