I'm looking for a Command Prompt alternative that supports handy features of Linux Terminal, like

  • Keeping history of Commands and accessing them using Up-Arrow key.
  • Logging commands in the file (like: .bash_history).
  • Ability to resize command window.
  • Allowing to use Ctrl+C and Ctrl+V to copy/paste content.

I went through Console, but I wonder if it supports anything beyond tweaking its UI. I'm more expecting the prompt to keep history of commands so that I don't have to enter them every time.

link|improve this question

62% accept rate
feedback

2 Answers

the old thing is called 'doskey'. it is in fact quite a familiar sight for us old buddies...

check out its help page:

C:\Users\bubu>doskey /?
Edits command lines, recalls Windows commands, and creates macros.

DOSKEY [/REINSTALL] [/LISTSIZE=size] [/MACROS[:ALL | :exename]]
  [/HISTORY] [/INSERT | /OVERSTRIKE] [/EXENAME=exename] [/MACROFILE=filename]
  [macroname=[text]]

  /REINSTALL          Installs a new copy of Doskey.
  /LISTSIZE=size      Sets size of command history buffer.
  /MACROS             Displays all Doskey macros.
  /MACROS:ALL         Displays all Doskey macros for all executables which have
                      Doskey macros.
  /MACROS:exename     Displays all Doskey macros for the given executable.
  /HISTORY            Displays all commands stored in memory.
  /INSERT             Specifies that new text you type is inserted in old text.
  /OVERSTRIKE         Specifies that new text overwrites old text.
  /EXENAME=exename    Specifies the executable.
  /MACROFILE=filename Specifies a file of macros to install.
  macroname           Specifies a name for a macro you create.
  text                Specifies commands you want to record.

UP and DOWN ARROWS recall commands; ESC clears command line; F7 displays
command history; ALT+F7 clears command history; F8 searches command
history; F9 selects a command by number; ALT+F10 clears macro definitions.

The following are some special codes in Doskey macro definitions:
$T     Command separator.  Allows multiple commands in a macro.
$1-$9  Batch parameters.  Equivalent to %1-%9 in batch programs.
$*     Symbol replaced by everything following macro name on command line.

C:\Users\bubu>

it doesn't keep the history in a file though, you can of course use doskey /history >file and stuff to do that, but it is not as automated as bash. ctrl-c generates interrupt and thus is not used in consoles. even xterm wouldn't allow that. (xterm uses mouse select as copy and right click as paste, for the matter)

alternatively, you can use cygwin and use bash instead... it also runs on windows.

link|improve this answer
feedback

Console can use more than just the Windows cmd.exe as its target shell. If you download, for example, the Windows port of the BASH shell you can use that instead under Console. This, in conjunction with additional tools like the MinGW (which includes the BASH for Windows port along with many of your favorite *nix terminal standbys like ls and wget) or GNUWin32 programs in your system path can give you a very Unix-y console in Windows.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.