mirror of
https://github.com/meineerde/dotfiles.git
synced 2025-10-17 19:41:01 +00:00
Remove gem directories from CDPATH, vastly simplify project_dirs helper
This commit is contained in:
parent
02fe70ba12
commit
85c1f32751
9
.bashrc
9
.bashrc
@ -215,14 +215,7 @@ cat() {
|
||||
|
||||
# directory for project
|
||||
project_dirs() {
|
||||
local dirs="__path__:$HOME/workspace/__path__:$HOME/__path__:$GEM_HOME/gems/__gempath__:$GEM_HOME/gems/__path__:$GEM_HOME/bundler/gems/__gempath__:$GEM_HOME/bundler/gems/__path__"
|
||||
if [[ -n "$1" ]]; then
|
||||
dirs="${dirs//__gempath__/__path__-*}"
|
||||
echo "${dirs//__path__/$1}"
|
||||
else
|
||||
dirs="${dirs//\/__gempath__/}"
|
||||
echo "${dirs//\/__path__/}"
|
||||
fi
|
||||
echo "${1:-.}:${HOME}/workspace/${1}:${HOME}/${1}"
|
||||
}
|
||||
|
||||
d() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user