mono / sdb

A command line client for the Mono soft debugger.
https://www.mono-project.com
MIT License
116 stars 44 forks source link

Support an aliases mapping #11

Closed bojanrajkovic closed 10 years ago

bojanrajkovic commented 10 years ago

It would be nice to be able to map aliases—even a simple linefeed delimited file like so would be good:

so: step over
si: step in
sout: step out
alexrp commented 10 years ago

How about an alias command of the form:

alias add <aliascmd> <actualcmd>
alias del <aliascmd>
alias clear
alias list

So you could say:

alias add s step {0}

You could then say s o and it would expand to step o. So a super simple string formatting thing where each specifier is filled in from a space-separated array of the input. Similarly:

alias add colors cfg set DisableColors {0}

Would let you say colors false or whatever.

bojanrajkovic commented 10 years ago

Works for me.

alexrp commented 10 years ago

Implemented, but only with support for a single formatting specifier. Anything more sophisticated will require some rethinking of how commands are processed...