Permalink
Browse files

small fix for grep matching

  • Loading branch information...
1 parent 70297e0 commit fd1cd14d369cc9f80240c889cb19a02b35c8a14f Mads Buus Westmark committed Nov 16, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 snapopen/__init__.py
View
@@ -109,13 +109,13 @@ def on_pattern_entry( self, widget, event ):
self.open_selected_item( event )
return
pattern = self._glade_entry_name.get_text()
- pattern = pattern.replace(" ","*")
+ pattern = pattern.replace(" ",".*")
cmd = ""
if self._show_hidden:
filefilter = ""
if len(pattern) > 0:
# To search by name
- cmd = "grep -m %d %s %s 2> /dev/null" % (max_result, pattern, self._tmpfile)
+ cmd = "grep -m %d -e '%s' %s 2> /dev/null" % (max_result, pattern, self._tmpfile)
self._snapopen_window.set_title("Searching ... ")
else:
self._snapopen_window.set_title("Enter pattern ... ")

0 comments on commit fd1cd14

Please sign in to comment.