Browse files

Avoid potential bash fns named "cd"

  • Loading branch information...
1 parent 7494ec3 commit 734b8f5a47537271fc527b6e80fc87f75f4a8e1a @Chouser Chouser committed Jan 9, 2014
Showing with 3 additions and 3 deletions.
  1. +3 −3 bin/box
View
6 bin/box
@@ -23,9 +23,9 @@ function run_box_job {
local cmd="${1:-help}"; shift
local d="$target_dir"
- while [[ "/" != $(\cd -P $d && \pwd) ]]; do
+ while [[ "/" != $(command cd -P $d && \pwd) ]]; do
if [[ -d "$d/.voom-box" ]]; then
- \cd $(\cd -P $d && \pwd)
+ command cd $(command cd -P $d && \pwd)
break
fi
d="$d/.."
@@ -39,7 +39,7 @@ function run_box_job {
# Return to our target location, as much as it still exists.
local d="$target_dir"
while ! [[ -d "$d" ]]; do d=$(dirname "$d"); done
- \cd "$d"
+ command cd "$d"
\rm "$tfile"
}

0 comments on commit 734b8f5

Please sign in to comment.