mirror of
https://github.com/meineerde/dotfiles.git
synced 2025-10-17 19:41:01 +00:00
Cleanup
This commit is contained in:
parent
ed69561695
commit
d4ed78f0a0
7
.bashrc
7
.bashrc
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user