Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change some variable names in the latest rvm-compatibility patch

  • Loading branch information...
commit 77316eff66bb20ed9dce7112f6a66d3cde74210e 1 parent a27aa8b
@philc authored
Showing with 6 additions and 5 deletions.
  1. +6 −5 fuzzycd_bash_wrapper.sh
View
11 fuzzycd_bash_wrapper.sh
@@ -3,11 +3,12 @@
# The "cd" command may have already been redefined by another script (RVM does this, for example):
if [ x`type -t cd` == "xfunction" ]; then
- # In this case, we define a new "__cd" function with the same body as the previously defined "cd" function.
- eval $(type cd | grep -v 'cd is a function' | sed 's/^cd/__cd/' | sed 's/^}/;}/' )
+ # In this case, we define a new "original_cd" function with the same body as the previously defined "cd"
+ # function.
+ eval $(type cd | grep -v 'cd is a function' | sed 's/^cd/original_cd/' | sed 's/^}/;}/' )
else
# Otherwise, we just define "__cd" to directly call the builtin.
- eval "__cd() { builtin cd \$*; }"
+ eval "original_cd() { builtin cd \$*; }"
fi
cd() {
@@ -19,8 +20,8 @@ cd() {
if [ "$output" = "@nomatches" ]; then
echo "No files match \"$*\""
elif [ "$output" = "@passthrough" ]; then
- __cd "$*"
+ original_cd "$*"
elif [ "$output" != "@exit" ]; then
- __cd "$output"
+ original_cd "$output"
fi
}
Please sign in to comment.
Something went wrong with that request. Please try again.