Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# C# Objects Inheritance Inheritance in Code

Darya Zata
Darya Zata
2,562 Points

Avoid tipping all compile comand

Hello all,

i really need some shortcut of tipping the following line EVERYTIME into a compiler: mcs -out:TreehouseDefense.exe *.cs && mono TreehouseDefense.exe

there is not copy paste option and in the video it looks like its shortut used , but i dont know how , and this is VERY time robbing tipping this line every each time.

PLS hepl

2 Answers

Steven Parker
Steven Parker
229,644 Points

You can create a shortcut using the "alias" command. For example:

alias run='mcs -out:TreehouseDefense.exe *.cs && mono TreehouseDefense.exe'

Then you would only need to give the commnd "run" to make all that happen.

Seth Kroger
Seth Kroger
56,413 Points

The console has a command history. You can use up-arrow to scroll through your previous commands.