Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding support for commands of the form "cd ../..", etc.

  • Loading branch information...
commit c89af6751a7767ebd8d6461bd8873393357bfeb6 1 parent 28840bc
harry authored committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  fuzzycd.rb
View
2  fuzzycd.rb
@@ -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 cd_path == "." || cd_path =~ /\.\.(\/\.\.)*/ || cd_path == "/" || cd_path == ENV["HOME"] ||
cd_path.rindex("/") == cd_path.size - 1
@out.puts "@passthrough"
exit
Please sign in to comment.
Something went wrong with that request. Please try again.