Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Oh, wow.

Please, can I get a decent command line now?



I use cygwin. I run cygwinsshd on localhost:22 and use Putty for my client.

A lot of windows-specific gui commands won't work through the ssh layer, but will if you run the cygwin bash shell directly. (Maybe there's some way to get them to work over SSH but I have never had reason to try and figure it out).

    $ which nmap.exe
    /cygdrive/c/Program Files/Nmap/nmap.exe
    
    $ nmap.exe -PN -p 80,443 news.ycombinator.com | grep tcp
    80/tcp  open  http
    443/tcp open  https
    
    $ which ipconfig
    /cygdrive/c/Windows/system32/ipconfig
    
    $ where ipconfig
    C:\Windows\System32\ipconfig.exe
    
    $ where which
    C:\cygwin\bin\which.exe
    
    $ which where
    /cygdrive/c/Windows/system32/where
    
    $ ipconfig /all | grep Physical
       Physical Address. . . . . . . . . : [redacted]
       Physical Address. . . . . . . . . : [redacted]
       Physical Address. . . . . . . . . : [redacted]
       Physical Address. . . . . . . . . : [redacted]
       Physical Address. . . . . . . . . : [redacted]
       Physical Address. . . . . . . . . : [redacted]
       Physical Address. . . . . . . . . : [redacted]
       Physical Address. . . . . . . . . : [redacted]
       Physical Address. . . . . . . . . : [redacted]
    
    $ reg query 'HKEY_LOCAL_MACHINE\Software\GOG.com\' /s | head
    
    HKEY_LOCAL_MACHINE\Software\GOG.com
        DefaultPackPath    REG_SZ    F:\
        DesktopIcon    REG_SZ    OFF
    
    HKEY_LOCAL_MACHINE\Software\GOG.com\Games
    
    HKEY_LOCAL_MACHINE\Software\GOG.com\Games\1207666383
        PATH    REG_SZ    F:\Star Wars - X-Wing (1993)
        GUID    REG_SZ    {F014338D-42E5-4DFC-BE77-F8E52BD998D5}


Why Putty over mintty? mintty is a fork of PuTTY's UI for local use, and is the default in cygwin these days.


I can't believe in 2015 PuTTY is still a thing.

Other platforms have a half dozen terminal programs, three of which are usually very good, and Windows has one that looks like it was hacked together on a weekend in 1998.


There is no analogy to putty on a Unix platform, because its not just implementing the console interface, its also the SSH implementation as well, on Unix systems, its pretty easy to write a fully functioning terminal, because your just hooking into the existing pty system, so all you need to do is write (or borrow) a competent vt100 emulation, and make a UI.

PuTTY is great, honestly. It's not pretty, but neither is the windows console nor PowerShell.


It's an ssh client. It is robust, easy to install and it works well.

How much energy do you expect me to waste evaluating and choosing new ones when the one I have works just fine the way it is? I have better things to be doing.


This is the poison in the open source world. If you have something that works "well enough" but never evolves, it holds everyone back. The barrier to entry is fairly high for an application like this, so I'm not saying this is an easy thing to fix, but it's worth fixing.

Linux in particular is filled with "well enough" solutions that should be striving to be better. Although there's misfires when controversial things like systemd happen, there has been steady improvement in other areas. Imagine if Nginx had never happened, if NCSA httpd was "good enough"?

The Windows user base deserves better than PuTTY.


But whats wrong with PuTTY?, is it missing features?, I mean. like it has full SSH support, its easy to use, and has a non-quirky terminal emulator.. I guess it could have more terminal types, but there are closed source options for that, like Reflections.


Mostly it seems like overkill to run a ssh server + client to get a local terminal.


I've been using putty since 2007 for managing remote unix systems. It's nice to have a uniform interface for everything. If I ever get to a point where using putty becomes a headache for some reason (and it hasn't in 8 years) then I'll switch to mintty. Mintty is definitely a better way to run the windows gui stuff from the command line if you care to do that (I just use the start menu to run windows gui apps).

Occasionally I get tripped up on linux terminals due to the additional requirement that I "ctrl-c" to activate a copy, but that is extremely minor since that method of copy/paste is shared by almost every other tool I use except for putty.


Copy/pasting long lines of text from the terminal...so tired of fixing all the broken lines manually.


Have you ever tried MobaXterm? I use that as my daily driver shell and am very happy with it! Both for ssh to remote boxes and as a local command prompt

http://mobaxterm.mobatek.net/


I get rendering problems with my font (BDF UM+ Outline), and find it has broken mouse reporting. e.g. in tmux, vertical splits aren't rendered, and clicks result in spam being written to the shell.

Also couldn't feel more clunky if it tried, impressive as its feature set is.


You mean like PowerShell?


No, the one with history going back more than an hour, and tab completions on anything except files in `pwd`.


Try https://github.com/lzybkr/PSReadLine - included in Windows 10 now.


Hey, do you have an announcement somewhere about it being included in 10? Congratulations, at any rate.


It hasn't been announced anywhere unless you count random tweets. I should post something on the PowerShell team blog one of these days.


> No, the one with history going back more than an hour

When did you last try PowerShell?

In version 1.0 the history size was 64 by default - but could be changed.

In PowerShell v3 that's increased to 4096 by default. If you can overflow that in an hour you are a seriously impressive typist! That more than one command line per second - sustained.

If you manage to break that, you can assign any value up to 32767 - yes that's 9 different commands per second.

PowerShell can discard duplicates, so if you manage to break 4096 different commands in the run of one day you are doing something wrong.

Like not using snippets (http://blogs.msdn.com/b/powershell/archive/2012/06/27/snippe...).

Oh - i forget - bash don't do snippets.

> and tab completions on anything except files in `pwd`.

Seriously, have you tried PowerShell - like ever?

PowerShell's tab completion blows anything bash out of the water: o PowerShell tab completions are based on command metadata - not on external "completion definitions". The result is that tab completion works for all cmdlets - not just for those that has a "completion file". o PowerShell will complete on anything: Command names, parameter names (options), parameter values - even dynamic values. Try this on PowerShell "ps <tab>" - and you'll be allowed to complete based on the names of running processes. o PowerShell tab completion also works for parameters of user defined functions - and even for parameters of script files. If you declare a script to take parameters, PowerShell will pick it up and allow tab completion on the parameter names and allowed values.


> When did you last try PowerShell?

I fired it up just now on Windows 7 that I have available.

> In PowerShell v3 that's increased to 4096 by default.

Once I quit Powershell, all my history's gone. On my unix machine, I can search my command history all the way back to 2011.

This short-term memory won't cut it for my needs.

> Try this on PowerShell "ps <tab>"

I tried, and immediately received the first file in my user directory.

"dir /<tab>" will erase the / and complete it with some other file name. I was expecting it to list the options.


that's basically what conemu brings


Disclaimer

ConEmu is not a shell, so it does not provide "shell features" like tab-completion, command history and others. [1]

[1]https://code.google.com/p/conemu-maximus5/


Fair point, my mistake: my ConEmu does have history and copletion but it has been so long ago I installed it I didn't remember this is through clink

https://code.google.com/p/conemu-maximus5/wiki/ConEmu_Clink


Powershell has had that support for quite a while too.


Have you given Cmder a go?

> http://gooseberrycreative.com/cmder/


I think one of Windows 10's improvements will be a better command line.


you can get conemu


Tried it, and it looks nice ... however crashes very often for me, and sometime becomes horribly slow (typing and seeing it displayed takes close to a second..)


I really like cmder (http://gooseberrycreative.com/cmder/) which is a wrapper to conemu + clink (which adds a bunch of nice enhancements to the command line).


Or Console2/ConsoleZ. I've been using them + cygwin for 7 years no, they're quite solid.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: