I'm trying to configure my Cygwin64 terminal to do certain existing commands using shorter keywords. For example, I want to be able to use clear by typing clr in all cases. However, I still want the original clear to work. Is this type of command "forwarding" possible?
This is known as command aliasing:
alias clr=clear
Both clr and clear will work
I hope this helps!
Is it possible to colour the console output with OCaml on Windows ?
It seems to be possible on a linux terminal : print_string "\027[31m blabla" but I cannot find any information regarding the Windows console.
Using ther Vanilla windows tooling..
Color management is not possible by default using the command ( ms dos ) console emulation.
Out of the box, the best you can get is by using the PowerShell command line interface instead and to configure the colors like explained in this page.
In an opened terminal:
write-host -foregroundcolor Red "Hello"
will result in Hello printed in Red ...
But this is not convenient at all..
A better solution provided by an external tool
The easiest way is to uses an external tool to do the job, but you'll need to install a kind of windows command line extension.
A nice project can be found HERE it's called ANSICON and will directly interpret the ANSI codes the same way the Linux modern terminal emulators does.
You may be interested in ANSITerminal
. I do not remember how good the Windows version is — I personally do not use that platform — but do not hesitate to fill issues or submit pull requests.
If you are looking for ANSI color support (and more) in cmd.exe you can use clink.
Is it possible to make Guake terminal to use 256 colors instead of just 8?
The only info that I found on the internet is this post https://bbs.archlinux.org/viewtopic.php?id=173707 but it didn't work.
Guake supports natively 256 colours. And this is the answer to your question ;)
For testing it, you can simply run this script.
Ok fixed: You just need to run this scripts provided here:
https://github.com/coolwanglu/guake-colors-solarized
It seems like versions of this question have been asked here before, but I haven't been able to glean from them the exact response to what I am looking for.
Say I open up a .txt file via vim on my mac machine and I then want to copy a line from that file to be used in another .txt file or in a google search or in terminal during an ssh session. What would be the simplest way to do this?
Thanks,
EDIT
Found a potential duplicate: Vim: copy selection to OS X clipboard. But I am open to improvements! :)
i'm not sure wether it works for osx too but here on linux i use "+<yank>, there is also "*<yank>
see also http://vim.wikia.com/wiki/Copy_an_Entire_Buffer_to_the_Clipboard
As mentioned in the other answer, use the + register or * register.
In some environments, * and + may not behave as expected. To enable the expected behavior, use a plugin like fakeclip. Fakeclip enables clipboard support when it is not available out of the box.
Looking for a better Windows XP command-line interface. The Visual Studio Command Prompt isn't near as nice as the Linux/OSX terminals.
Thoughts?
edit:
Answers: Console on Sourceforge, and the Windows Powershell. Thanks, I'll go dig them up and evaluate them.
The Cygwin package is too much overhead for what I want.
edit2:
Looks like the Windows Powershell for now. Its copy&paste functionality isn't great, but MS supports it.
Take a look at Console2 http://sourceforge.net/projects/console/
It's features:
"multiple tabs, text editor-like text selection, different background types, alpha and color-key transparency, configurable font, different window styles"
As has your question been tagged, have you tried Windows PowerShell? It's paradigm is based on unix's pipes but instead of outputting text the processes output .Net objects.
cygwin? www.cygwin.com. Or mingwin?
Cygwin
This is an answer extending line.
I'm not clear on what you mean by Linux/OSX command prompts being "nice". If you just mean that they provide more utilities, I usually install Windows Services for Unix to add common programs like grep and vi.
I see you put "powershell" as one of your tags. Maybe you could help direct our answers by explaining what you don't like about PowerShell as a replacement for cmd.exe?
I use Take Command from JP Software
Cygwin is a good alternative. You can run Bash or other shells on Windows. You get most of your classic Linux/UNIX commands, shell scripting, etc. You even get the GNU compilers and can avoid Visual Studio if you wish. From Cygwin, you can access your regular Windows programs, drives, etc so there's rarely a reason to go back to cmd.exe.
If you are just looking to automate tasks via shell scripts (not interactive shell), then you should look at Windows Scripting Host. WSH is a feature-rich scripting environment for Windows that comes pre-installed on all modern versions of Windows.
I've been combining putty, cygwin, screen, and zsh(not bash) lately. I like a lot of the features of zsh, like autocd which and auto-pushd, which put the directories you change into onto the directory stack without having to type pushd. I also like that fact that multiple shells share history, and don't overwrite each other. Screen lets me run multiple zsh shells in one putty window. You can get zsh and screen from the cygwin site. I run: putty -cygterm screen
You'll also need the patched version of putty that has the -cygterm support.
GitBash by git is also a good option. It can be configured to be used in unix like environment.
It can be downloaded from here http://msysgit.github.io/