summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xranger/config/commands.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index f132e444..e7ddb200 100755
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -104,8 +104,13 @@ class alias(Command):
     def execute(self):
         if not self.arg(1) or not self.arg(2):
             self.fm.notify('Syntax: alias <newcommand> <oldcommand>', bad=True)
-        else:
-            self.fm.commands.alias(self.arg(1), self.rest(2))
+            return
+
+        if self.arg(1) == 'alias':
+            self.fm.notify("Can't create alias with name 'alias'", bad=True)
+            return
+
+        self.fm.commands.alias(self.arg(1), self.rest(2))
 
 
 class echo(Command):