Permalink
Browse files

• Improve completion of bracket accessor.

  The partial path regex matched an opening quote followed by anything but
  closing brackets, but brackets _may_ be part of the path, just not the quote
  sign. So we use a backref instead.
  • Loading branch information...
1 parent 3b27754 commit bd801df47066ba47cb74f2612a044aeed3d921c4 @mkhl mkhl committed Jan 22, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rush/shell.rb
View
2 lib/rush/shell.rb
@@ -108,7 +108,7 @@ def print_result(res)
def path_parts(input) # :nodoc:
case input
- when /((?:@{1,2}|\$|)\w+(?:\[[^\]]+\])*)\[(['"])([^\]]+)$/
+ when /((?:@{1,2}|\$|)\w+(?:\[[^\]]+\])*)\[(['"])([^\2]+)$/
$~.to_a.slice(1, 3).push('[').push($~.pre_match)
when /((?:@{1,2}|\$|)\w+(?:\[[^\]]+\])*)\/(['"])([^\2]+)$/
$~.to_a.slice(1, 3).push('/').push($~.pre_match)

0 comments on commit bd801df

Please sign in to comment.