5 ms·
Why is no one putting in any time to replace the Windows shell (cmd.exe)? The stock offering is abysmal and Cygwin isn't much better. We could really use someth
by acron0 13y ago
Why is no one putting in any time to replace the Windows shell (cmd.exe)? The stock offering is abysmal and Cygwin isn't much better. We could really use something with a bit of panache like this... Hmmm..
- spindritf 13y agoI'm guessing that people who cared about the terminal, and CLI in general, moved to other OSes a long time ago. And it's not just a glib answer, that's actually why I first gave Linux a real shot as my main system -- to replace Putty with a pretty, transparent terminal window and have all the GNU tools that go with it.
- mutewinter 13y agoI've often wondered that too. Console2[1] is the best alternative I've found for cmd.exe. Mintty[2] is a decent alternative to Cygwin. [1]: http://www.hanselman.com/blog/Console2ABetterWindowsCommandPrompt.aspx http://www.hanselman.com/blog/Console2ABetterWindowsCommandP... [2]: https://code.google.com/p/mintty/ https://code.google.com/p/mintty/
- andrewaylett 13y agoMintty isn't an alternative to Cygwin, it's a part of Cygwin: an alternative to the standard windows terminal that Cygwin used to launch by default. Recent Cygwin installers actually set up Mintty by default. You seem to be confusing terminals (programs that provide a text environment) and shells (usually text-based, often run inside a terminal). Mintty is a terminal. cmd.exe is a shell, but will spawn Windows' own ANSI terminal when asked. Cygwin's bash will also spawn Windows' own terminal when run without one. Fish is a shell, and needs to be run inside a terminal. Console2 is different again. As I understand it, it wraps Windows' terminal, providing some extra features.
- gecko 13y agoWhy does PowerShell not qualify? Or are you merging cmd.exe with the Windows console subsystem?
- dietrichepp 13y agoI wonder why PowerShell isn't more... default.
- oddthink 13y agoFor me, it's not compatible enough. At work we have a few batch scripts that set up the path and set some environment variables, so we can launch compiles/tests/etc with a short command. These work under cmd.exe, but not under powershell. I keep meaning to experiment with powershell, but never quite enough to overcome that initial barrier. (I'm 95% on Linux, so it's not as if improving my windows workflow would make a big difference.)
- shadowfox 13y agoTurns out that the batch file thing is a fairly common issue. If you install the Powershell Community Extensions (PSCX), a pretty useful Powershell module in general, it has a command (Invoke-BatchFile) to execute a batch file and propagate the environment changes back to powershell. (While this is not always sufficient; I have found it to be enough for most purposes)
- dietrichepp 13y agoIf you're 95% on Linux, you might like PowerShell just because it's a bit more familiar. You can run 'ls' and 'rm -r somedir' just like you're used to (although with quirks, 'rm' only takes one argument, but the argument can be a wildcard... which is expanded by rm, not the shell). I'd say I spend 98-99% of my time in Linux or OS X + zsh, and during my 1-2% time on Windows I was using MSYS until I found PowerShell.
- mjs 13y agoWell, there's the Windows PowerShell: http://en.wikipedia.org/wiki/Windows_PowerShell http://en.wikipedia.org/wiki/Windows_PowerShell It's actually got some quite interesting concepts, and is extremely consistent. These tips also convey the approach and how it works: http://technet.microsoft.com/en-us/library/ee692948.aspx http://technet.microsoft.com/en-us/library/ee692948.aspx
- WickyNilliams 13y agoI'm in the process of learning powershell, and I must say it's extremely intuitive. More so than BASH or CMD, I'd say. Every command is of the form Verb-Noun. Which means you can get off the ground really quickly, as there are only about 15 different verbs. This means you can often guess what you want, even for commands you've never used. Still can't find what you want? Then you can use wildcard searching on the Get-Command command, which returns all matching commands! The icing on the cake for me is the consistency between interacting with different data sets. For example, New-Item is a command for creating a new item (duh!). The great thing about this however is that this command can be used to create files, registry entries, websites in IIS. This works by allowing you to browse all these things just as you would a file system. e.g. you can "cd" into IIS and treat it just like you would files on disk. Really an eye opener into what a modern shell should be like
- ch_123 13y ago"Every command is of the form Verb-Noun. Which means you can get off the ground really quickly, as there are only about 15 different verbs. This means you can often guess what you want, even for commands you've never used." Sounds quite a lot like VMS' DCL, which is similarly intuitive, albeit overly verbose at times.
- WickyNilliams 13y agoJust had a look at it, you're right there's definite similarities between the two. I guess someone at MS had a soft spot for DCL!
- yareally 13y agoWhat's wrong with cygwin (just curious what you dislike about it)? It's fine if you're just trying to do linux based stuff on Windows. It's much more complicated if you are trying to work with the Windows subsystem though. If that is your complaint, I would generally agree, but trying to integrate POSIX on the Windows object like model is not an easy task and what Powershell was made to try to do instead (as best it could since Linux is configured by text files mostly and Windows is Objects). Here's a great comment[1] by one of the developers of Powershell explaining why it is the way it is. If you dislike using it directly through cmd.exe due to the abysmal UI (as I do), there's alternatives that let you use it with putty[2] and leave cmd.exe interface all together. [1] http://stackoverflow.com/questions/573623/powershell-vs-unix-shells/573861#573861 http://stackoverflow.com/questions/573623/powershell-vs-unix... [2] http://www.9bis.net/kitty/?page=PuTTYCyg http://www.9bis.net/kitty/?page=PuTTYCyg
- acron0 13y agoIt's not so much that there's anything wrong with it, but it feels like a shim. Functionally, it's awesome, but it could do with sex-ing up a bit. I'm just envying the fact that Fish appears to have style; it's pretty. I like pretty.
- mateuszf 13y agocygwin + mingw + zsh looks quite good to me. Been using this for few years now. EDIT: I meant mintty .. it is small, pretty and configurable.
- yareally 13y agoTry kitty + puttycyg with cygwin (or alternatively, just puttycyg[1], but it's no longer maintained and not as feature rich, but still works). I think that is what you're looking for from my own experience. You'll get all the features of putty and a 256 color terminal if you enable it, plus utf8 support. No local sshd required (I used to just ssh locally into cygwin with its built in sshd before I found puttycyg and kitty). [1] http://code.google.com/p/puttycyg/ http://code.google.com/p/puttycyg/
- tezza 13y ago
- inoop 13y agoI can recommend console2+powershell. Powershell is basically bash but with object pipes instead of character pipes. It's all built on top of dotnet, so if you're familiar with c# you should feel at home with the API. You can do stuff like ps | ? { $_.Name -match "iexplore" } | % { $_.Kill() } to kill all instances of internet explorer. The `ps` command outputs System.IO.Process objects. The ? { ... } syntax is a filter, inside which you can use $_ to refer to the element you're matching. You can access the 'Name' property directly and use -match to match it against an expression. Finally the % { ... } syntax executes some code on every element, in this case it calls System.IO.Process.Kill() to kill the process. Console2 puts a nice face on things and supports tabbing and resizing, as you would expect from a usable terminal window.
- crosvenir 13y agoI love Console2. Be advised that it doesn't play nice with some things (or maybe the other way around?). I downloaded less for windows [1] yesterday and it completely hosed the terminal (changed all the colors and made the window ~10px wide and taller than my resolution). Thinking back on it I'm not terribly surprised this happened given what Console2 is. [1] http://gnuwin32.sourceforge.net/packages/less.htm http://gnuwin32.sourceforge.net/packages/less.htm
- mkl 13y agoYou may also like ConEmu (http://code.google.com/p/conemu-maximus5/ http://code.google.com/p/conemu-maximus5/). I switched to it from Console2 a few months ago and like it better - it has more customisation options and features like being able to move the cursor by clicking, administrator terminal in a tab, and the double-click to select a word thing that I constantly missed with Console2.
- klibertp 13y agoYes, but no. I was working with this configuration for some time and it is really nice if you're satisfied with life inside MS's walled garden. The problem is that there is absolutely no interoperability with standard *nix tools. What's worse, PowerShell pretends that there is - `ps` in your example is just an alias for 'Get-Process' cmdlet, the same is true for cat, ls and other things. Aside from that PowerShell is really solid shell. You can extend it with C# code and you get access to many .NET feature both in the command prompt and from PowerShell scripts. The scripts are quite nice for a shell scripts, it offers a few built-in data structures like arrays and hashes, there is a quite good autocompletion, even for .NET classes and objects and so on.
- deleted 13y ago[deleted]
- zokier 13y agoMSYS-style environments deserve a mention too. Git for windows includes a usable enough bash, with nice integration with explorer context-menu.
- jeremyjh 13y agoYes I have to use Windows at work and I use MSYS. It doesn't have "everything" like cygwin, but everything is a native win32 application and interop is much better. I do use their bash but mostly use cmd.exe with all the MSYS binaries in my path, so I ls and grep and tail all I want and also still use other native windows command-line programs seamlessly. The bash will interop with some programs but not everything.
- bliker 13y agoFor me, powershell has very slow startup time. So I stick with cmd.exe. But it beefed up quite a bit. I am using: - msys-git (I have ls, rm -rf... all unix goodness) - clink (better tab completion, history, all around good stuff) - console2 (styling) - ansicolor (colored prompt) and also I got some usefull aliases. If you are interested I can write down some steps for other people to follow. screenshot http://i.imgur.com/hATwCVI.png http://i.imgur.com/hATwCVI.png
- acron0 13y agoThat's beautiful!
- shocks 13y agoWow that's a nice setup. I'm already using clink (my brother is the author), but I'm checking the rest out now. Thanks!
- randomguy7788 13y agoyes please! would love to have a setup like yours on windows
- mariusmg 13y agoConEmu . Also ConEmu + Powershell = god mode on Windows. http://code.google.com/p/conemu-maximus5/ http://code.google.com/p/conemu-maximus5/
- bliker 13y agoLove the Quake mode on ConEmu. (roll window down from top)
- shocks 13y agoTry clink[1]. It brings some powerful aspects of Bash to cmd.exe. 1: https://code.google.com/p/clink/ https://code.google.com/p/clink/
- brudgers 13y agoThe more interesting question is why doesn't 'nix have Powershell and a layer of abstraction upon which it can sit equivalent to the CLR? Perhaps to be files all the way up is a limitation of the bazaar - at least until one hits the JVM, hopefully. There's no contract assuring that level of abstraction between the user and the turtles. And agreement that such a layer of abstraction is a good thing is unlikely to be forthcoming.
- dcre 13y agoIt's a little complicated, it's also possible to use iPython, an enhanced Python interpreter, as a shell quasi-replacement on Windows. (It's even more powerful in combination with PowerShell.) Features: It has tab autocompletion. You can send commands directly to the underlying system shell with '!' (e.g., !dir) and save the result in a Python variable for manipulation (a = !dir). It has special commands called "magics" that let you do neat stuff that the standard shell doesn't, like time how long things take to run. It has a robust command history. What this means is you can write Python code as your shell scripting language.
- danbmil99 13y agoI would gladly donate $100 to anyone working on a cygwin fish port
- digisign 13y agoThere has been one for about twenty years called 4NT, now tccle.