summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorWojciech Siewierski <wojciech.siewierski@onet.pl>2019-10-02 23:14:45 +0200
committerGitHub <noreply@github.com>2019-10-02 23:14:45 +0200
commit7338801c355e72354ec73beee798c21c46757b03 (patch)
tree4f6620faab5a89af920f602d48fdebb597389535
parent23440660291c236eb374e2d72406c1f35f026289 (diff)
parent807974ce63ba2db7c2e9705c59b54398420130fc (diff)
downloadranger-7338801c355e72354ec73beee798c21c46757b03.tar.gz
Merge pull request #1709 from toonn/deprecate-cptunmap
Deprecate c/p/tunmap in favor of unc/p/tmap
-rwxr-xr-xranger/config/commands.py51
1 files changed, 45 insertions, 6 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index 404a1edb..b146cec9 100755
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -1321,30 +1321,69 @@ class unmap(Command):
             self.fm.ui.keymaps.unbind(self.context, arg)
 
 
-class cunmap(unmap):
+class uncmap(unmap):
+    """:uncmap <keys> [<keys2>, ...]
+
+    Remove the given "console" mappings
+    """
+    context = 'console'
+
+
+class cunmap(uncmap):
     """:cunmap <keys> [<keys2>, ...]
 
     Remove the given "console" mappings
+
+    DEPRECATED in favor of uncmap.
     """
-    context = 'browser'
 
+    def execute(self):
+        self.fm.notify("cunmap is deprecated in favor of uncmap!")
+        super(cunmap, self).execute()
 
-class punmap(unmap):
-    """:punmap <keys> [<keys2>, ...]
+
+class unpmap(unmap):
+    """:unpmap <keys> [<keys2>, ...]
 
     Remove the given "pager" mappings
     """
     context = 'pager'
 
 
-class tunmap(unmap):
-    """:tunmap <keys> [<keys2>, ...]
+class punmap(unpmap):
+    """:punmap <keys> [<keys2>, ...]
+
+    Remove the given "pager" mappings
+
+    DEPRECATED in favor of unpmap.
+    """
+
+    def execute(self):
+        self.fm.notify("punmap is deprecated in favor of unpmap!")
+        super(punmap, self).execute()
+
+
+class untmap(unmap):
+    """:untmap <keys> [<keys2>, ...]
 
     Remove the given "taskview" mappings
     """
     context = 'taskview'
 
 
+class tunmap(untmap):
+    """:tunmap <keys> [<keys2>, ...]
+
+    Remove the given "taskview" mappings
+
+    DEPRECATED in favor of untmap.
+    """
+
+    def execute(self):
+        self.fm.notify("tunmap is deprecated in favor of untmap!")
+        super(tunmap, self).execute()
+
+
 class map_(Command):
     """:map <keysequence> <command>