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
|
||||
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
|
||||
echo $dir
|
||||
break
|
||||
fi
|
||||
done
|
||||
unset dir
|
||||
}
|
||||
|
||||
# do stuff with project
|
||||
with_project() {
|
||||
target=$(d "$1")
|
||||
local target=$(d "$1")
|
||||
if [[ $target ]]; then
|
||||
echo "$2 $target"
|
||||
"$2" "$target"
|
||||
else
|
||||
echo "unknown project"
|
||||
fi
|
||||
unset target
|
||||
}
|
||||
|
||||
# cd to project
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user