Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

4 Answers 4

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.

share|improve this answer

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.

share|improve this answer

Try TCC/LE, which features command line editing and history, among others. It's the freeware edition of the Take Command environment software.

Once you have it installed, you can specify which aspect you want logged (commands, errors, history) and in which file you want them saved. TCC/LE can be used in combination with either Console or ConEmu.

enter image description here

share|improve this answer
up vote 0 down vote accepted

It is quite an old Question, and still remains the same until I recently found a great command prompt alternative called ConEmu.

enter image description here

It supports wide array of features like, tabs, auto-restoring sessions on restart, Power Shell integration, and main thing, History of commands. Although it still doesn't support file-based history (thus history is lost on restart), but being an Open Source tool, I'm planning to add that support (unless Windows 10 command prompts delivers all the promises I saw in preview). Thanks everyone who answered.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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