1
0
mirror of https://github.com/meineerde/dotfiles.git synced 2025-10-17 19:41:01 +00:00
This commit is contained in:
Holger Just 2011-08-31 14:52:50 +02:00
parent ed69561695
commit d4ed78f0a0

View File

@ -257,25 +257,24 @@ cat() {
# directory for project # directory for project
d() { d() {
for dir in $HOME/workspace/$1 $HOME/$1 $1 /Volumes/Finn/$1 $RUBY_PATH/$RUBY_VERSION/lib/ruby/gems/*/gems/$1-* $GEM_HOME/gems/$1; do local dir
for dir in $HOME/workspace/$1 $HOME/$1 $1 /Volumes/Finn/$1 $RUBY_PATH/$RUBY_VERSION/lib/ruby/gems/*/gems/$1-* $GEM_HOME/gems/$1-*; do
if [[ -d "$dir" ]]; then if [[ -d "$dir" ]]; then
echo $dir echo $dir
break break
fi fi
done done
unset dir
} }
# do stuff with project # do stuff with project
with_project() { with_project() {
target=$(d "$1") local target=$(d "$1")
if [[ $target ]]; then if [[ $target ]]; then
echo "$2 $target" echo "$2 $target"
"$2" "$target" "$2" "$target"
else else
echo "unknown project" echo "unknown project"
fi fi
unset target
} }
# cd to project # cd to project