Is there a better Windows Console Window? [closed] - windows

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
I find working on the command line in Windows frustrating, primarily because the console window is wretched to use compared to terminal applications on linux and OS X such as "rxvt", "xterm", or "Terminal". Major complaints:
No standard copy/paste. You have to turn on "mark" mode and it's only available from a multi-level popup triggered by the (small) left hand corner button. Then copy and paste need to be invoked from the same menu
You can't arbitrarily resize the window by dragging, you need to set a preference (back to the multi-level popup) each time you want to resize a window
You can only make the window so big before horizontal scroll bars enter the picture. Horizontal scroll bars suck.
With the cmd.exe shell, you can't navigate to folders with \\netpath notation (UNC?), you need to map a network drive. This sucks when working on multiple machines that are going to have different drives mapped
Are there any tricks or applications, (paid or otherwise), that address these issue?

Sorry for the self-promotion, I'm the author of another Console Emulator, not mentioned here.
ConEmu is opensource console emulator with tabs, which represents multiple consoles and simple GUI applications as one customizable GUI window.
Initially, the program was designed to work with Far Manager (my favorite shell replacement - file and archive management, command history and completion, powerful editor). But ConEmu can be used with any other console application or simple GUI tools (like PuTTY for example). ConEmu is a live project, open to suggestions.
A brief excerpt from the long list of options:
Latest versions of ConEmu may set up itself as default terminal for Windows
Use any font installed in the system, or copied to a folder of the program (ttf, otf, fon, bdf)
Run selected tabs as Administrator (Vista+) or as selected user
Windows 7 Jump lists and Progress on taskbar
Integration with DosBox (useful in 64bit systems to run DOS applications)
Smooth resize, maximized and fullscreen window modes
Scrollbar initially hidden, may be revealed by mouseover or checkbox in settings
Optional settings (e.g. pallette) for selected applications
User friendly text and block selection (from keyboard or mouse), copy, paste, text search in console
ANSI X3.64 and Xterm 256 color
Far Manager users will acquire shell style drag-n-drop, thumbnails and tiles in panles, tabs for editors and viewers, true colors and font styles (italic/bold/underline).
PS. Far Manager supports UNC paths (\\server\share\...)

Try Console 2.
Console is a Windows console window enhancement. Console features include: multiple tabs, text editor-like text selection, different background types, alpha and color-key transparency, configurable font, different window styles

Take Command. This one has been around for a long time (formerly 4DOS). I used this on Windows NT 3.5 (!) and loved it.
Cygwin lets you run X on Windows, so you can fire up xterm or whatever terminal app you prefer, and also get the benefit of using a UNIX shell.

Turn on quickedit mode (but selection is still rectangular instead of line-wrapped)
Resizing by dragging works for me
You can change the buffer size which will impact when scrollbars appear
pushd \\server\share
Even with those, cmd.exe isn't a great console. See all the other replies and the earlier stackoverflow questions on the same subject. The "Console" project from sourceforge looks pretty good.

Console
From documentation:
NOTE: Console is NOT a shell.
Therefore, it does not implement shell
features like command-line completion,
syntax coloring, command history, etc.
Console is simply a nice-looking front
end for a shell of your choice
(cmd.exe, 4NT, bash, etc.) Other
command-line utilities can also be
used as 'shells' by Console.
As a programming shell one can use ipython.

I've had these issues too for years on Windows, but I recently found this project:
Console
It still requires "mark mode" for copy/paste, but at least it's available from a right-click contextual menu (so you don't need to move the mouse to the top left and then move it again to the text you want to select)
UNC paths are not supported by cmd.exe but they are supported by PowerShell.
(Console can be configured to use any shell, including cmd.exe and PowerShell)

I use Cygwin inside the Poderosa terminal emulator.

I personally use Mintty. Therefore I use Cygwin (because thats the only shell it supports, as far as I know).
BTW There is another question: better command for Windows? I found.

I think you will love PowerCMD which you can work 4 command windows at the same time. Also, you can use many extra commands inside the PowerCMD.
PowerCMD

There is a small program mo.exe on github that solves the first three issues:
https://github.com/boolship/Mo
It runs in normal DOS console window, Git Bash on Windows, etc.
update:
That link is now deprecated, use: https://github.com/boolship/MoDi

Use Gow.exe ..
This will make your DOS-Prompt as Linux terminal...
else
Use ZOC.exe...its Trial-period terminal...
else
Install Git .. it gives a bash-console from where u can use unix commands, partially

I'm using Terminals for remote connection via Telnet, RDC, SSH, ...
Combines most used protocolls in one program.
URL: http://www.codeplex.com/Terminals

Why not use Putty?

I use rxvt from cygwin. It behaves very much like an xterm.

Take a look at Take Command.
Take Command is a comprehensive interactive GUI and command line environment that makes using the Windows command prompt and creating batch files easy and far more powerful.
(Take Command is, however, "not free".)

Related

Is there a way to determine if a terminal is focused without asking the window manager?

I want to change some tmux styling when the terminal loses focus/becomes inactive (i.e. when I've clicked on an open Google Chrome window). I know I could check with the window manager to see which application window is focused, but this doesn't work across window managers.
Do terminal emulators themselves expose this information at all?
I tried running showkey -a to see if any escape sequence was sent when focus was lost, and it doesn't look like it.
I think some terminals implement this, but not all, based on this comment on the issue tracker for the vim-tmux-focus-events plugin:
About the question "I was expecting the event to fire when changing focus between different windows in my window manager": yea, I see how that would be very useful. I think this might be dependent on the terminal application you're using. I just tested this on OSX and here's some quick results:
it's working for iTerm when tmux is running inside the window
not working for iTerm running plain bash + vim inside (no tmux)
not working for Terminal.app (with or without tmux)
[...]
So, if I'm not wrong, it's up to terminal applications to implement "focus gained", "focus lost" functionality.
I have a vague memory (though I don't remember for sure) that focus gain/loss might have worked for me when using that plugin and gnome-terminal, so it might be worth a try.

How do you get the Windows Console \ Command Prompt to display color?

My problem is as follows:
I used to code on Linux (Ubuntu, to be more precise), but now I am using a Windows machine (7 and 8.1). One of the major caveats for me is that the Command Prompt in either Windows does not display other colors or font styles other than the default one, resulting in a monotone terminal.
This is useful for debugging Symfony projects (as errors have colors, making them easier to read) and more. This happens out of the box in the Linux terminal and wish to have the same behavior in Windows.
Is there a way to achieve this in the default Command Prompt (how?) or is there a 3-rd party application that achieves this (I've already tried PowerCMD but apparently it doesn't allow php to output to the console)?
I had the same problem and solved it by switching to another terminal.
I Use "cmder" terminal for windows which supports all the color codes out of the box. Symfony3 console looks pretty much as the one you know from Linux.
Check out this comparison article: Comparison to other window terminal
Download cmder terminal from: cmder homepage
Cmder terminal comes with build in color themes for terminal window. The one below comes by default "Monokai", but if you like the standard look feel free to switch to "Ubuntu" or "xterm" theme (those are also build in themes - there are more themes available out of the box).
"Monokai"
"Ubuntu"
"xterm"
If you like transparency for active and inactive terminal window you can set it too (Settings shortcut -> "Ctrl + Alt + P").
As Symfony2 console component documentation says, windows doesn't support natively ANSI colors. You could install ANSICON as suggested there or you can try with cygwin, it has full shell support (bash or zsh) so you can have colors and many more things.

Getting gui dialog pop-ups (from bash) to stay on top of other windows

I posted this on the yad list, apparently with invisibility enabled (nobody's even viewed it! - usually, the list is very responsive.), so I thought I'd see if any of you have some ideas. It probably applies to any bash script using any gui pop-up utility such as dialog, xdialog, or zenity with the KDE desktop.
In general, I love yad. It blows away zenity and the developer is usually right there to answer questions and fix/enhance things.
Essentially, I have a set of scripts that use pop-up gui dialogs for interaction with the user.
It works great until you click the mouse anywhere else on the KDE desktop while one of the pop-ups is displayed.
Once you do that, all subsequent dialogs "appear" behind everything else and are usually invisible except for in the taskbar and have to be manually selected from there to become visible/active/focused again.
Is there a way to fix this? I assume it's a desktop and not a yad problem.
Thanks,
Joe
kubuntu precise 64-bit (KDE 4.8.5)
My duplex printing system, written in bash, makes multiple calls to yad from within one (possibly nested) script. It works great, but has one major problem.
If the user clicks the mouse anywhere outside a yad dialog while the script is running and displaying something with yad, all subsequent yad dialogs appear behind everything else and are essentially invisible.
The script still shows up in the task manager, so these dialogs can be brought back to the foreground one by one, but it's really counter-intuitive and annoying.
I assume this is a "feature" of KDE and not a bug in yad.
Is there any way to fix/prevent this? I tried adding --on-top to the dialogs, but it didn't help.
When I'm running the script (which may take awhile, or I may want to do something else while a dialog is waiting for input), I can't do anything else for fear of having this problem occur. I can switch to another desktop, but that's dodgy because the next dialog (but only that one) may pop up there and throw the whole thing off.
I'm using the latest yad from the ppa on kubuntu precise.
The stacking order of windows is controlled by the KDE window manager. When a UI application, like yad, creates a window, it may communicate preferred attributes, like "always on top", to the WM. When this does not work for some reason, you may try to call command line utility, for example wmctrl that instructs the WM to raise an existing window:
wmctrl -a "Yad"
Thanks! I had the same issue with a zenity dialog poped up from a gedit custom External tool (sh script). Adding the wmctrl -a "CVS commit" cmd fixed it.

Show text in the center of terminal screen in golang

I am playing with golang and want to create a simple terminal tool (on mac, but it should work on linux too). I need to display character "x" in the center of the terminal window. How can I detect width and height of terminal window and detect its changes?
A terminal package exists in the Go crypto repository:
In particular, check out the GetSize function
A lightweight alternative to the usual ncurses option, is termbox-go. This is a pure-go implementation of termbox.
It offers a simple API to get some 'graphical' stuff done in a terminal and is pretty decent as far as support for different terminal implementations goes.

Unable to use X clipboard in Screen

I read the following code in Unix Power Tools on page 117
*VT100.Translations: #override\
Button1 <Btn3Down>: select-end(primary,CUT_BUFFER0,CLIPBOARD)\n\
!Shift <Btn2Up>: insert-selection(CLIPBOARD)\n\
~Shift ~Ctrl ~Meta <Btn2Up>: insert-selection(primary,CUT_BUFFER0)
I have not managed to see any effect of the above code.
How can you use X clipboard in Screen, without your mouse?
Using the mouse. Left-click drag to select and usually the middle mouse button pastes but some terminals may differ (PuTTY uses right-click). If you only have two buttons you click them both together (left mouse button + right mouse button).
In reply to comment below ("Can you do it without your mouse?"):
ctrl-insert : copy
shift-insert : paste
shift-delete : cut
shift-ctrl-C : copy
shift-ctrl-V : paste
Not all applications will support the last three (though Konsole does). In fact most console applications will not allow you to delete text once it's printed.
As far as selecting text without a mouse I'm not sure there's a generic mechanism for that. It's probably terminal and/or application specific (ie, vim has it's own keys for marking and copying text - but only within vim). You could do it with mouse emulation but I'm sure that would be a painful process.
You can't use the traditional Mac/Windows shortcuts in a terminal because they were reserved for different actions long before these OS existed (ie, Ctrl-C terminates the running process).
I'm trying to use Ctrl-C in X
X does not handle these operations directly, they are handled by the application. That's why modern GUI programs like Firefox or Gedit support Ctrl-C for copy but terminals and command-line programs generally do not. As I said, it's a conflict in established conventions and Ctrl-C for kill got in first.
BTW, you could do some key-remapping if it drives you nuts but then you would be learning bad habits when you use a different machine. Best to just get used to it or do most of your editing in a GUI application.
More Information
EDIT: For a Mac, this may help: MacOSX-to-Konsole or This or This. It looks like you need to replace Ctrl with Command on Mac keyboards. It seems like Terminal the mac console has a right-click context menu for copy-paste so to do it the traditional way you me need to install a different console program or change some settings in Terminal.

Resources