about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorMilan Svoboda <msvoboda@ra.rockwell.com>2014-11-25 21:44:24 +0100
committerMilan Svoboda <msvoboda@ra.rockwell.com>2014-11-25 21:44:24 +0100
commit2e7f35a52f0ab0d6402df26a59573218552518a4 (patch)
tree5ecc8991bdb7dc72746d1bf1bfa958788ba479f5 /ranger
parentfd808da18aff05c8b7e1bd2c15a8cdfb1ee7ba28 (diff)
downloadranger-2e7f35a52f0ab0d6402df26a59573218552518a4.tar.gz
add documentation for flat command
Diffstat (limited to 'ranger')
-rw-r--r--ranger/config/commands.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index 953e2cc3..b0089e59 100644
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -1266,9 +1266,10 @@ class flat(Command):
     """
     :flat <level>
 
-    Flattens the directory view up to level specified.
+    Flattens the directory view up to the specified level.
+
         -1 fully flattened
-        0  remove flattened view
+         0 remove flattened view
     """
 
     def execute(self):
@@ -1277,6 +1278,8 @@ class flat(Command):
             level = int(level)
         except ValueError:
             level = self.quantifier
+        if level < -1:
+            self.fm.notify("Need an integer number (-1, 0, 1, ...)", bad=True)
         self.fm.thisdir.unload()
         self.fm.thisdir.flat = level
         self.fm.thisdir.load_content()