summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2019-11-03 15:59:25 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2019-11-03 15:59:25 -0500
commit34158ac44cb993ae64fd7ef0a6102eb20cba3c7a (patch)
tree3a6e8095a26dd49fa70d8e2f66877bd1708895a0
parent601b457af97e26c8e228a7ffbc42eb7be8117f8b (diff)
downloadcmd2-git-34158ac44cb993ae64fd7ef0a6102eb20cba3c7a.tar.gz
Improved macro documentation
-rw-r--r--docs/features/shortcuts_aliases_macros.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/features/shortcuts_aliases_macros.rst b/docs/features/shortcuts_aliases_macros.rst
index 2a2bf654..e5b4bf1d 100644
--- a/docs/features/shortcuts_aliases_macros.rst
+++ b/docs/features/shortcuts_aliases_macros.rst
@@ -93,6 +93,16 @@ command is run. For example:
my_macro beef broccoli ---> make_dinner -meat beef -veggie broccoli
+Similar to aliases, pipes and redirectors need to be quoted in the definition
+of a macro::
+
+ macro create lc !cat "{1}" "|" less
+
+To use the literal string ``{1}`` in your command, escape it this way:
+``{{1}}``. Because macros do not resolve until after hitting ``<Enter>``,
+tab completion will only complete paths while typing a macro.
+
+
For more details run: ``help macro create``
The macro command has ``list`` and ``delete`` subcommands that function