finally added what belongs here

This commit is contained in:
Toon Claes 2011-09-02 15:17:17 +02:00
commit b9fe362216
2 changed files with 41 additions and 0 deletions

11
custom/emacs.zsh Normal file
View file

@ -0,0 +1,11 @@
#!/bin/zsh
# Emacs
function em() {
emacs $@ &>/dev/null &!
}
# Emacs client
function emc() {
emacsclient -n $@
}

30
custom/go.zsh Normal file
View file

@ -0,0 +1,30 @@
#!/bin/zsh
function project() {
cmd="cd"
file=$1
if [[ "open" == "$file" ]] then
file=$2
cmd=(${(s: :)EDITOR})
fi
for project in $PROJECT_PATHS; do
if [[ -d $project/$file ]] then
$cmd "$project/$file"
unset project # Unset project var
return
fi
done
echo "No such project $1"
}
alias p="project"
alias m="project open"
function _project () {
compadd `/bin/ls -l $PROJECT_PATHS 2>/dev/null | awk '{ print $8 }'`
}
compdef _project project