summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd2/cmd2.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index b40c8ded..8fdaa697 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -1452,6 +1452,10 @@ class Cmd(cmd.Cmd):
except AttributeError:
compfunc = self.completedefault
+ # Check if a macro was entered
+ elif command in self.macros:
+ compfunc = self.path_complete
+
# A valid command was not entered
else:
# Check if this command should be run as a shell command
@@ -2277,6 +2281,9 @@ class Cmd(cmd.Cmd):
" If you want to use redirection or pipes in the alias, then quote them to prevent\n"
" the 'alias create' command itself from being redirected\n"
"\n"
+ " Since aliases are resolved during parsing, tab completion will function as it would\n"
+ " for the actual command the alias resolves to."
+ "\n"
"Examples:\n"
" alias ls !ls -lF\n"
" alias create show_log !cat \"log file.txt\"\n"