forked from ohmyzsh/ohmyzsh
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
97 changed files
with
2,631 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,29 @@ | |||
#usage: title short_tab_title looooooooooooooooooooooggggggg_windows_title | |||
#http://www.faqs.org/docs/Linux-mini/Xterm-Title.html#ss3.1 | |||
#Fully support screen, iterm, and probably most modern xterm and rxvt | |||
#Limited support for Apple Terminal (Terminal can't set window or tab separately) | |||
function title { | |||
[ "$DISABLE_AUTO_TITLE" != "true" ] || return | |||
if [[ "$TERM" == screen* ]]; then | |||
print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars | |||
elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then | |||
print -Pn "\e]2;$2:q\a" #set window name | |||
print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal) | |||
fi | |||
} | |||
|
|||
ZSH_THEME_TERM_TAB_TITLE_IDLE="%15<..<%~%<<" #15 char left truncated PWD | |||
ZSH_THEME_TERM_TITLE_IDLE="%n@%m: %~" | |||
|
|||
#Appears when you have the prompt | |||
function precmd { | |||
title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE | |||
} | |||
|
|||
#Appears at the beginning of (and during) of command execution | |||
function preexec { | |||
emulate -L zsh | |||
setopt extended_glob | |||
local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} #cmd name only, or if this is sudo or ssh, the next cmd | |||
title "$CMD" "%100>...>$2%<<" | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,26 @@ | |||
stat -f%m . > /dev/null 2>&1 | |||
if [ "$?" = 0 ]; then | |||
stat_cmd=(stat -f%m) | |||
else | |||
stat_cmd=(stat -L --format=%Y) | |||
fi | |||
|
|||
_ant_does_target_list_need_generating () { | |||
if [ ! -f .ant_targets ]; then return 0; | |||
else | |||
accurate=$($stat_cmd .ant_targets) | |||
changed=$($stat_cmd build.xml) | |||
return $(expr $accurate '>=' $changed) | |||
fi | |||
} | |||
|
|||
_ant () { | |||
if [ -f build.xml ]; then | |||
if _ant_does_target_list_need_generating; then | |||
sed -n '/<target/s/<target.*name="\([^"]*\).*$/\1/p' build.xml > .ant_targets | |||
fi | |||
compadd `cat .ant_targets` | |||
fi | |||
} | |||
|
|||
compdef _ant ant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,6 @@ | |||
# commands to control local apache2 server installation | |||
# paths are for osx installation via macports | |||
|
|||
alias apache2start='sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper start' | |||
alias apache2stop='sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper stop' | |||
alias apache2restart='sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper restart' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,3 @@ | |||
if [ -f `brew --prefix`/etc/autojump ]; then | |||
. `brew --prefix`/etc/autojump | |||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,4 +1 @@ | |||
# add brew completion function to path | alias brews='brew list -1' | ||
fpath=($ZSH/plugins/brew $fpath) | |||
autoload -U compinit | |||
compinit -i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,3 @@ | |||
alias be="bundle exec" | |||
alias bi="bundle install" | |||
alias bu="bundle update" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
|
@@ -18,4 +18,4 @@ function _cap () { | ||
fi | fi | ||
} | } | ||
|
|
||
compctl -K _cap cap | compctl -K _cap cap |
Oops, something went wrong.