Permalink
Browse files

Adding support for "cd -".

  • Loading branch information...
1 parent c89af67 commit ad2554faeb9e07e722e1b97516692ff48a70bf80 harry committed with May 20, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 fuzzycd.rb
View
@@ -107,7 +107,7 @@ def matches_for_path(path)
end
# When the path ends in "/" and for other special-case paths, just let cd handle it directly.
-if cd_path == "." || cd_path =~ /\.\.(\/\.\.)*/ || cd_path == "/" || cd_path == ENV["HOME"] ||
+if [".", "/", "-", ENV["HOME"]].include?(cd_path) || cd_path =~ /\.\.(\/\.\.)*/ ||
cd_path.rindex("/") == cd_path.size - 1
@out.puts "@passthrough"
exit

0 comments on commit ad2554f

Please sign in to comment.