I have inherited a beautiful mess of doskey macros, and is trying to sort them by areas of concern. So far I haven't been able to find any references that mention comments in any way, but this seems such a common scenario that I'd be surprised if it is not supported in some way..
Is there any support for comments in doskey macro files?
Or do you have any other suggestions on how to achieve a similar goal?
This page has an example of a workaround for comments in doskey.
This involves using ;= as a pseudo-comment e.g.
;= File listing enhancements.
ls=dir /x $*
l=dir /x $*
ll=dir /w $*
la=dir /x /a $*
;= Remember to set the ; back to null at the end.
;= Otherwise, you may trigger an error on load.
;=
I ended up splitting related commands into separate macro files, and running a bat-script to load them all. The bat-file then contains REM comments, while the doskey macro files are entirely comment-free.
REM Macros that deal with the XYZ project
doskey /macrofile=XYZ_macros.txt
(It is like a combination of James Broadhead's and eduffy's suggestions)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With