Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix a bug where we would not try to complete paths starting with ../

  • Loading branch information...
commit 57bb48b1f2d55c0e098f45336a4651076f11a047 1 parent 4539e8d
Phil Crosby authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  fuzzycd.rb
View
2  fuzzycd.rb
@@ -102,7 +102,7 @@ def matches_for_path(path)
# Just invoke cd directly in certain special cases (e.g. when the path is empty, ends in "/" or exactly
# matches a directory).
-if cd_path.nil? || [".", "/", "-", ENV["HOME"]].include?(cd_path) || cd_path =~ /\.\.(\/\.\.)*/ ||
+if cd_path.nil? || [".", "/", "-", ENV["HOME"]].include?(cd_path) || cd_path =~ /^\.\.(\/\.\.)*$/ ||
cd_path.rindex("/") == cd_path.size - 1 || File.directory?(cd_path)
@out.puts "@passthrough"
exit

0 comments on commit 57bb48b

Please sign in to comment.
Something went wrong with that request. Please try again.