The previous thread is incorrect, and the $T token should not be used at the end of a macro. It acts as a command separator within a single DOSKEY macro definition; not as a separator between multiple definitions. (A regular line break is enough for that.)
DOSKEY macros work by transforming input before it's seen by the actual program (Cmd). Each $T in the macro becomes a line break (Enter ↵ keypress) in the expanded output. For example, if you had typed e Hello!:
- the macro
e=echo $* generates echo Hello!↵;
- the macro
e=echo $* $T generates echo Hello! ↵↵;
- the macro
e=echo $* $T echo Bye! generates echo Hello! ↵ echo Bye!↵.
(Of course, when making DOSKEY macros for Cmd, you can use the normal & or && as a command separator. However, that's not available in other interactive programs – DOSKEY is a generic feature and could be used to make aliases for tools like Netsh, or the MySQL interactive client. Some of them only allow one command per line, therefore a DOSKEY macro needs $T to send multiple commands at once.)