Menu

#15 doskey macros are not expanded correctly

open
nobody
None
5
2012-10-26
2009-10-06
Anonymous
No

DOSKEY macros are not expanded within PyCmd, which leads to the following error:
C:> doskey c=cls
C:> c
'c' is not recognized as an internal or external command,
operable program or batch file.

The same sequence works correctly directly in cmd.exe.

Discussion

  • Horea Haitonic

    Horea Haitonic - 2009-10-07

    Supporting DOSKEY is a bit difficult, PyCmd will never be able to fully support it.

    The macros seem to be the easy part though, and what you ask for can be done. I am just wondering how is this weird DOSKEY mechanism better than using batch files and environment variables. E.g. for your example, are there any advantages over having a 'c.bat' somewhere in the PATH?

    Can you please help me figure out what are some important usage patterns for DOSKEY macros? I've never used DOSKEY before...

    Thanks!

     
  • roman

    roman - 2009-10-07

    Thanks for the prompt response!

    I use DOSKEYs simply as substitutes for bash-style aliases, i.e., shortcuts for frequently used commands and command sequences. The 'c.bat' idea would also work, of course, but seems a bit kludgy..

     

Log in to post a comment.