Skip to content

Commit

Permalink
small fix for grep matching
Browse files Browse the repository at this point in the history
  • Loading branch information
Mads Buus Westmark committed Nov 16, 2010
1 parent 70297e0 commit fd1cd14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions snapopen/__init__.py
Expand Up @@ -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 ... ")
Expand Down

0 comments on commit fd1cd14

Please sign in to comment.