about summary refs log tree commit diff
path: root/ranger/.config/ranger/commands.py
diff options
context:
space:
mode:
authorRaphael McSinyx <vn.mcsinyx@gmail.com>2017-08-06 00:36:31 +0700
committerRaphael McSinyx <vn.mcsinyx@gmail.com>2017-08-06 00:36:31 +0700
commitd721c7a5f9fa2c26e97e616542b516daced4dc08 (patch)
tree9ff3fdaef426a079c82fe5e3a972c2514936d4e8 /ranger/.config/ranger/commands.py
parent04bb23545ae2d7029ecfc4401ea94d89970dd89c (diff)
downloaddotfiles-d721c7a5f9fa2c26e97e616542b516daced4dc08.tar.gz
Update 2017-08-06
Diffstat (limited to 'ranger/.config/ranger/commands.py')
-rw-r--r--ranger/.config/ranger/commands.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/ranger/.config/ranger/commands.py b/ranger/.config/ranger/commands.py
index 2df405f..1386e84 100644
--- a/ranger/.config/ranger/commands.py
+++ b/ranger/.config/ranger/commands.py
@@ -8,13 +8,15 @@
 from ranger.api.commands import *
 
 # A simple command for demonstration purposes follows.
-#------------------------------------------------------------------------------
+# -----------------------------------------------------------------------------
 
 # You can import any python module as needed.
 import os
 
 # Any class that is a subclass of "Command" will be integrated into ranger as a
 # command.  Try typing ":my_edit<ENTER>" in ranger!
+
+
 class my_edit(Command):
     # The so-called doc-string of the class will be visible in the built-in
     # help that is accessible by typing "?c" inside ranger.
@@ -37,7 +39,7 @@ class my_edit(Command):
             # reference to the currently selected file.
             target_filename = self.fm.thisfile.path
 
-        # This is a generic function to print text in ranger.  
+        # This is a generic function to print text in ranger.
         self.fm.notify("Let's edit the file " + target_filename + "!")
 
         # Using bad=True in fm.notify allows you to print error messages:
@@ -52,7 +54,8 @@ class my_edit(Command):
 
     # The tab method is called when you press tab, and should return a list of
     # suggestions that the user will tab through.
-    def tab(self):
+    # tabnum is 1 for <TAB> and -1 for <S-TAB> by default
+    def tab(self, tabnum):
         # This is a generic tab-completion function that iterates through the
         # content of the current directory.
         return self._tab_directory_content()