Command-Line Arguments and Navigation

Apr 2, 2010

For the majority of computer users, using the command-line is never going to be more efficient than pointing and clicking. That is the better way for most people to complete most tasks.

Programmers have needs that differ from many other users…

> > (Hosted on another page) < <

Originally posted as part of GameDevLessons.com Vol. 13



Learn and practice team game development with Gamkedo Club.
Membership worldwide. Professional support. Proven process.




Subscribe by e-mail to receive weekly updates with Gamkedo.Community interviews and YouTube training videos for game developers!



One Comment

  1. A few ideas I find indispensible for command-line work on Windows:

    1) Console, download from sourceforge:
    http://sourceforge.net/projects/console/

    This is an alternative to the standard Windows ‘cmd’. The main advantage is that it properly distinguishes between:
    a) The console, i.e. the windows into which you type, and in which text appears
    b) The shell, i.e. the program in the background which interprets what you type, and the output of which is displayed in the console.

    ‘Console’ provides (a), and by default, it will use a ‘cmd’ session as its shell, so you can type Windows commands into here that are indistinguishable from those you would type into ‘cmd’. However, you can easily hook up alternative shells, such as a bash shell for unix-like power, or PowerShell for .Net stuff, or a Python shell. You can open as many of each shell as you need, each in their own tab. This means that your shortcut keys and colors and other console configuration can be shared between all your different command-line shells.

    2) Cygwin
    http://cygwin.org

    This provides two things:
    a) A bash shell. This provides the most fundamental built-in unix command line tools such as ‘do’ and ‘for’ loops, backtick quoting to execute a command and use its output, etc.
    b) The usual array of Unix command line utilitites like ‘ls’ and ‘grep’, etc.

    This can be used on its own, in a CMD-style window, using the .bat file that comes with Cygwin. Or it can be used in conjunction with Console (above), by telling Console to use Cygwin bash as one of its shells.

    Even better, I actually put the directory of the cygwin command line utilities on my PATH, so that unix utils like ‘ls’ and ‘grep’ are always available, whether I’m in a bash shell or a cmd shell. I put them on the PATH before everything else, so that in instances where there is a name clash between Windows and Unix command line executables, I will get the (generally more useful) Unix version. I worried this might break other people’s DOS scripts sometimes, but in practice I’m not aware it’s ever caused me a problem. There is one wrinkle – a couple of Windows commands, such as ‘date’ and ‘time’, are not executables on the path, instead they are built-in to cmd. Hence a cmd shell will always get the Windows versions of these commands, regardless of PATH.

    These are amongst the first things I install on any Windows box I’m working on.

All contents Copyright ©2017 Chris DeLeon.

Site production by Ryan Burrell.