File tree Expand file tree Collapse file tree 4 files changed +6
-8
lines changed Expand file tree Collapse file tree 4 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ Main Features
3131- Multi-line commands
3232- Special-character command shortcuts (beyond cmd's ` ? ` and ` ! ` )
3333- Command aliasing similar to bash ` alias ` command
34- - Macros, which are similar to aliases, but can take arguments when called
34+ - Macros, which are similar to aliases, but they can contain argument placeholders
3535- Ability to load commands at startup from an initialization script
3636- Settable environment parameters
3737- Parsing commands with arguments using ` argparse ` , including support for sub-commands
Original file line number Diff line number Diff line change @@ -2431,7 +2431,7 @@ def macro_list(self, args: argparse.Namespace) -> None:
24312431 # Top-level parser for macro
24322432 macro_description = ("Manage macros\n "
24332433 "\n "
2434- "A macro is similar to an alias, but it can take arguments when called ." )
2434+ "A macro is similar to an alias, but it can contain argument placeholders ." )
24352435 macro_epilog = ("See also:\n "
24362436 " alias" )
24372437 macro_parser = ACArgumentParser (description = macro_description , epilog = macro_epilog , prog = 'macro' )
@@ -2443,7 +2443,7 @@ def macro_list(self, args: argparse.Namespace) -> None:
24432443 macro_create_help = "create or overwrite a macro"
24442444 macro_create_description = "Create or overwrite a macro"
24452445
2446- macro_create_epilog = ("A macro is similar to an alias, but it can take arguments when called .\n "
2446+ macro_create_epilog = ("A macro is similar to an alias, but it can contain argument placeholders .\n "
24472447 "Arguments are expressed when creating a macro using {#} notation where {1}\n "
24482448 "means the first argument.\n "
24492449 "\n "
Original file line number Diff line number Diff line change @@ -75,10 +75,8 @@ Macros
7575======
7676
7777``cmd2 `` provides a feature that is similar to aliases called macros. The major difference between macros and aliases
78- is that macros are intended to take arguments when called. These can be useful if you need to run a complex command
79- frequently with different arguments that appear in various parts of the command.
80-
81- Arguments are expressed when creating a macro using {#} notation where {1} means the first argument.
78+ is that macros can contain argument placeholders. Arguments are expressed when creating a macro using {#} notation
79+ where {1} means the first argument.
8280
8381The following creates a macro called my_macro that expects two arguments:
8482
Original file line number Diff line number Diff line change 2828 - Multi-line commands
2929 - Special-character command shortcuts (beyond cmd's `?` and `!`)
3030 - Command aliasing similar to bash `alias` command
31- - Macros, which are similar to aliases, but can take arguments when called
31+ - Macros, which are similar to aliases, but they can contain argument placeholders
3232 - Ability to load commands at startup from an initialization script
3333 - Settable environment parameters
3434 - Parsing commands with arguments using `argparse`, including support for sub-commands
You can’t perform that action at this time.
0 commit comments