summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--examples/rc_emacs.conf1
-rw-r--r--ranger/config/commands.py8
2 files changed, 4 insertions, 5 deletions
diff --git a/examples/rc_emacs.conf b/examples/rc_emacs.conf
index e8b76ff2..f5e66b89 100644
--- a/examples/rc_emacs.conf
+++ b/examples/rc_emacs.conf
@@ -419,7 +419,6 @@ eval for arg in "rwxXst": cmd("map <C-x>-{0}  shell -f chmod u-{0} %s".format(ar
 
 # Search for letters as you type them
 #eval for arg in "abcdefghijklmnopqrstuvwxyz": cmd("map {0} console search_inc {0}".format(arg))
-map <allow_quantifiers> false
 
 # ===================================================================
 # == Define keys for the console
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index 9f0481ce..18615f4f 100644
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -226,7 +226,7 @@ class shell(Command):
         else:
             before_word, start_of_word = self.line.rsplit(' ', 1)
             return (before_word + ' ' + file.shell_escaped_basename \
-                    for file in self.fm.thisdir.files \
+                    for file in self.fm.thisdir.files or [] \
                     if file.shell_escaped_basename.startswith(start_of_word))
 
 class open_with(Command):
@@ -548,7 +548,7 @@ class mark_tag(Command):
     def execute(self):
         cwd = self.fm.thisdir
         tags = self.rest(1).replace(" ","")
-        if not self.fm.tags:
+        if not self.fm.tags or not cwd.files:
             return
         for fileobj in cwd.files:
             try:
@@ -1131,7 +1131,7 @@ class scout(Command):
         self.fm.thistab.last_search = regex
         self.fm.set_search_method(order="search")
 
-        if self.MARK in flags or self.UNMARK in flags:
+        if (self.MARK in flags or self.UNMARK in flags) and thisdir.files:
             value = flags.find(self.MARK) > flags.find(self.UNMARK)
             if self.FILTER in flags:
                 for f in thisdir.files:
@@ -1234,7 +1234,7 @@ class scout(Command):
         cwd     = self.fm.thisdir
         pattern = self.pattern
 
-        if not pattern:
+        if not pattern or not cwd.files:
             return 0
         if pattern == '.':
             return 0