Live data from Hacker News

Reimagining the Windows Command Line

tltjr.github.com

51–60 of 74 posts

Re: Reimagining the Windows Command Line

#51
post #34

This might be slightly off-topic, but am I the only one that thinks that command line tools are archaic with some pretty serious drawbacks? I see and acknowledge the power they can wield in the right hands, but for mere mortals it's a terrible experience. Especially on a windows box. I've started learning Symfony2, and the default is to get it up and running using the dependancy manager composer, a commandline based…

>> This might be slightly off-topic, but am I the only one that thinks that command line tools are archaic with some pretty serious drawbacks? I see and acknowledge the power they can wield in the right hands, but for mere mortals it's a terrible experience.

You've asked the question and answered it yourself ;-)

Using a GUI over the CLI is probably preferred for 90% of the tasks 95% of the users typically perform. I don't agree with all the drawbacks you listed, but I can see where they are coming from. The CLI is simply not so great for typical computer users.

That said, a good CLI is absolutely invaluable for power users, system adminstrators, developers, etc. There's only so much you can conveniently do through a GUI, as soon as you need to compose multiple complex actions into a script or perform advanced data extraction, search operations, automate tasks, etc. there really is no alternative for a good CLI.

The funny thing about a powerful CLI is that it isn't very accessible unless you invest quite a bit of time mastering it, but once you do, you'll find out that you can do many (most?) things more efficiently by typing up commands and composing them into scripts. Once you get proficient using the CLI, you'll find yourself using the CLI for all kinds of things you used to do through a GUI before. For example selecting and copying around files or extracting archives, personally I think CLI tools (in my case unix CLI tools) to be much more flexible and convenient than something like WinZip.

But just like most people will never use their computer to write scripts or computer programs, they will also never invest time in learning the CLI. And usually they don't really need to anyway, just like most people don't need (or want) to learn how to change the oil on their car themselves, no matter how easy it is if you know how to do it. It's not something they enjoy learning about, but that doesn't mean changing oil is useless or difficult.

The lack of a proper CLI in Windows 9x and XP has always bothered me a great deal, as a developer and power user. It was one of the main reasons to switch to Linux and later OS X. Apparently these days Windows has a pretty good CLI with PowerShell, but the Windows train has already departed a long time ago for me. But it's still a good thing Microsoft finally decided they had to provide power tools like a CLI, it's one reason less blocking me from every going back to Windows (a lot of others still remain though ;-)

Re: Reimagining the Windows Command Line

#52
post #34

This might be slightly off-topic, but am I the only one that thinks that command line tools are archaic with some pretty serious drawbacks? I see and acknowledge the power they can wield in the right hands, but for mere mortals it's a terrible experience. Especially on a windows box. I've started learning Symfony2, and the default is to get it up and running using the dependancy manager composer, a commandline based…

Most of your complaints sound like problems with documentation (it existing and/or you using it) or problems with a poorly defined tool (edit), lol, or is specific to the Windows shell. I can think of several GUI apps that have ALL of those problems but I also can't script them, alias them or fix them. I spent 75% of my day in the terminal because I'm proficient and fast with it. Most of programming has a learning cu…

You make some good points, let me try to answer.

First, I'm certainly not dismissing it. Yes, I'm frustrated, but I'm also aware that a lot of people much smarter than me swear by this tool, so there's obviously a lot of value there. I'm more dismayed by the learning curve. I come from a sales/marketing/ux/business kind of background so my mindset is different. I like my tools to be beautiful and intuitive. As simple as possible but no simpler as Einstein famously said.

The problem, as I see it, is that the commandline is like a marathon you have to run before you reap any rewards. Learning the commandline involves a whole sleuth of different things. Finding the right tools (I can infer from your post I obviously don't have those :-)), learning how filesystems work, unixy commands, git, cygwin, the list goes on. Seen from my perspective (and this might well be wrong) you basically have to have a good grasp of a whole boatload of ideas, technologies and concepts before a commandline tool is of any use to you. There's no easy way to learn a bit at a time. It's an either/or kind of deal.

I don't see any easy solutions to this, but I think it's a problem.

Re: Reimagining the Windows Command Line

#53
post #47
post #41

Earlier quoted context omitted.

Typing is always going to be faster than clicking around in an interface. Take the time to learn it. There was a time when command line was also for "mere mortals". What moved us away from that? Windows. Something to think about.

I respectfully disagree. moving around a filesystem for instance, in a GUI based tool I click on a folder and view it's contents. In a commandline tool I type an often long path, hit enter and view a list of files and/or folders in that particular folder. If I want to move up or down I issue another command that I have to type. I don't get any visual cues as to where I am in the structure either. I fail to see how ty…

How often are you "moving up and down" on the command-line? I usually have a few terminals open to common places that I need to be (or tabs, if that's how you roll) all with command histories applicable to each task.

Instead of 20 letters, just type the first couple, tab complete (z-shell makes this fluid) and hit enter. If some directories have a single sub directory, it's just tab-tab-tab and you're at the base.

To get a "visual cue", type pwd or have a setting for your shell that follows your directory path.

You can also set up aliases or shell variables for common paths. This has the benefit of not being cluttered (like shortcuts on a desktop) while allowing you to "cd essays" instead of "cd documents/writing/essays".

Also, there's the benefit of find/grep. If you can't remember where a file is, but you know generally where it is, cd there, find "part-you-remember" or grep -R "some unique text" and you'll get your answer soon enough. This has the benefit over full desktop search in that you get local results, so you may have to only sift through 3 or 4 "README" files instead of dozens.

Sometimes I use a graphical file browser, but mostly for images. For that, I use nautilus. But I can open nautilus from my current directory. For example, to get to my code, I can just "cd project-name; nautilus ." (having set up a variable) instead of trying to navigate there from /.

I'm not saying GUI tools are bad; I'm saying that for many tasks, the command-line is more efficient, but a GUI tool is just a command away.

Re: Reimagining the Windows Command Line

#54
post #51
post #34

This might be slightly off-topic, but am I the only one that thinks that command line tools are archaic with some pretty serious drawbacks? I see and acknowledge the power they can wield in the right hands, but for mere mortals it's a terrible experience. Especially on a windows box. I've started learning Symfony2, and the default is to get it up and running using the dependancy manager composer, a commandline based…

>> This might be slightly off-topic, but am I the only one that thinks that command line tools are archaic with some pretty serious drawbacks? I see and acknowledge the power they can wield in the right hands, but for mere mortals it's a terrible experience. You've asked the question and answered it yourself ;-) Using a GUI over the CLI is probably preferred for 90% of the tasks 95% of the users typically perform. I…

That's a great reply!

The problem is that people like me, who are somewhat technically inclined but not fulltime programmers, fall in between two chairs. I need to do some reasonably advanced stuff, but I face a steep learning curve before I can do it, and I'm not sure it's worth it since it's not my main occupation.

Re: Reimagining the Windows Command Line

#56
I'm actually glad for the inefficiency of the Windows command-line. Every time I boot up into Windows to test something, I'm reminded of how much I hate it. Since moving to Linux, development is just easier in every way:

* viM instead of Visual Studio has made me a better programmer * think more, guess less * I can keep customizations when I remote in and patch production code * Bash is much more productive than .bat files * Piping is amazing (cat file | sed | awk | ...) * Tons of documentation online

If Windows had a decent command-line (with decent documentation of course), I might convince myself to put up with less malleable tools just to play games without rebooting.

Don't get me wrong, Windows is fine, but it's not Unix. A better command-line app can't change that.

Re: Reimagining the Windows Command Line

#57
post #34

This might be slightly off-topic, but am I the only one that thinks that command line tools are archaic with some pretty serious drawbacks? I see and acknowledge the power they can wield in the right hands, but for mere mortals it's a terrible experience. Especially on a windows box. I've started learning Symfony2, and the default is to get it up and running using the dependancy manager composer, a commandline based…

If these are the problems you see with CLI, then you're doing it wrong. - Discoverability: tab completion, apropos manpages, listing out your search path directories, using your Debian GNU/Linux distribution's package management tools to search / explain packages and commands. - Dependencies: Debian GNU/Linux, APT, and policy. There's a reason I'm an unrepentant bigot. Debian-based distros are a fair substitute. RPM…

the "kid" seems to be on windows, which ha a crappy cli in a non posix env , which makes it even more difficult to use with a cli...

Re: Reimagining the Windows Command Line

#58
For most of Microsoft's lifetime, I've wondered why MS didn't just build a unix-style command line into Windows, providing a major upgrade to the ridiculous DOS. As a Windows dev, I always downloaded unix utilities for DOS and the first thing I put on any new Windows box is Cygwin. After decades of the same ol' DOS, it's obvious that MS just doesn't care about the command line.

One reason I switched to Mac for Web dev is the tightly integrated unix command line. I love it, but I don't think Apple does. I don't think the integrated unix CLI is any emblem of enlightenment on Apple's part; it's a historical accident. A company that believes that even granting users a "files and folders" view is giving them too much power (iOS) is no stalwart defender of the command line interface. As we make the Windows -> Metro, Mac -> iOS shift, the time may come when any command line access to a commercial OS is part of a "developer tools" package available only to "registered" developers who have "signed zee papers."

I've only used Linux servers for years. I wonder if I'll end up a few short years from now with some sort of hackers' Android laptop, built with Apple-quality hardware/software integration by somebody like Samsung for the niche of people who want real computers instead of media purchasing appliances.

Re: Reimagining the Windows Command Line

#60
post #58

For most of Microsoft's lifetime, I've wondered why MS didn't just build a unix-style command line into Windows, providing a major upgrade to the ridiculous DOS. As a Windows dev, I always downloaded unix utilities for DOS and the first thing I put on any new Windows box is Cygwin. After decades of the same ol' DOS, it's obvious that MS just doesn't care about the command line. One reason I switched to Mac for Web de…

Seriously, MS has been going toward easy scripting for years:

http://en.wikipedia.org/wiki/Windows_PowerShell

And Powershell ISE is like bash with Intellisense.

You can access .Net from Powershell and pretty much do anything you want. You can easily write new commands in C#.

Everything you want is already there. You just have to step slightly out of the Unix mindset to find the Windows equivalent. And I'd have to say that the powershell idea of passing objects around instead of text is exceptionally useful.

Post reply on HN