Command lines were an early innovation in computers, and were the dominant way to interact with them in the 1960’s – 80’s. That gave way to GUIs for most users after that. I don’t think we need to launch a scientific study to figure out why. Most users find it more comfortable and intuitive to accomplish things with interactive moments and visual feedback.
But command lines never went away. GUI’s are generally a limited abstraction of what you could do through a command line anyway, so power users gravitate toward the closer-to-the-metal nature of the command line.
But we might be in the middle of a return to a happy medium.
We know Apple is quite fond of cutting features. Particularly little-used features or power-user-only features. Curiously, this one has stuck around:
William Pearson wrote:
If there’s only one keyboard shortcut you should remember in Mac OS X it’s this: Go To Folder. … Is there a keyboard shortcut that is more useful than “Go To Folder”? I don’t think so.
I’m not sure about that, but it’s clear some people take this shortcut pretty seriously! And yes, a keyboard shortcut, but one that essentially opens a command line prompt that can do one thing.
I guess that isn’t terribly surprising, considering the success of apps like Alfred, which perhaps it’s fair to say is a command line for finding, opening and doing things.
The Finder also has Spotlight (since OS X 10.4 Tiger anyway, 2005) which is largely a thing for search (especially these days, as it returns results the web as well).
Spotlight has a keyboard command (Command-Space) and then you just type to do stuff, so it’s very much a command prompt. Just one that’s pretty decked out in user-friendliness.
And while we’re on this bend, we can’t forget about Quicksilver. Interestingly, both Alfred and Quicksilver postdate Spotlight. I guess that speaks to Spotlight kind of sucking in the early days, and leaving people wanting more.
Most developers, I’m sure, are quite aware of the literal command line. Almost all the big development tools are command line based tools. Everything from Git to Gulp, image optimizers to package managers, Capistrano to webpack… they are all tools you use from the command line. If you have a GUI for any of them, it’s probably a light abstraction over command line methods.
But, aside from the most hardcore of all Vim users who do all their code editing from a terminal window, we don’t actually write code on the command line, but in an editor with a GUI.
Code Editors are a perfect breeding ground for ideas that combine the best of GUI’s and command lines.
Let’s look at Sublime Text. When creating a new folder, I might want to do that with the GUI. There I can see the existing folder structure and see exactly what I’m doing.
But say I want to jump to a file I know exists. Say it’s buried a number of directories deep, and I’m glad that it is because it adheres to the structure of the current project. I might have to click – click – scroll – click – scroll – click to get there with a GUI, which isn’t the greatest interaction.
Instead, I can fire up a command prompt in Sublime Text, in this case it’s iconic Goto Anything command, type in something close to the file name, and find it.
Perhaps even more command-prompt-like is the literal Command Palette which is an extensible command-running menu triggered by a keyboard shortcut. Perhaps I want to run a specific Emmet command, correct syntax highlighting, or trigger an a find/replace extension to do its thing.
These things are in a similar boat as finding a file-in-a-haystack. There could be hundreds or thousands of commands. Your brain and typing fingers can find them quicker than your hand on a mouse in a UI can.
Sketch Runner is a popular plugin for Sketch that adds a command prompt to Sketch. Here’s their product video:
If you think of elements and groups in a design document just like files in a code project, the “Jump anywhere” feature makes sense. It’s just like “Goto Anything”.
Perhaps your design document has hundreds of symbols. Your brain probably has a mental map of that that is quicker to navigate than moving your mouse through nested menus. Thus, a command prompt to type in the name (fuzzy search) and insert it.
Too many Slacks, amiright?
I don’t think it would be terrible uncommon to have a dozen Slack teams, hundreds of channels, and thousands of people. Particularly if you’re fond of joining “Public Slacks”, like say the A11Y Slack.
Say I want to shoot a message to Sarah. I can open the Quick Switcher and just start typing her name and get there.
You have to be in the right Slack for names (or channels) to work, but you can get to the right slack via Quick Switcher and then do a new search.
Notion has a pretty awesome take on the command prompt. It’s available everywhere you are in a document just by pressing the slash / key.
There are probably ~30 things you can do. The menu is nice, but being able to type what you mean quickly is even better.
In addition to searching the menu, you can just complete the word after the slash (a slash command) to do the thing.
I’ve been using the command prompt in Chrome Dev Tools _so much more_ because opening the Animate tab takes like 17 clicks.
Yet another good use case!
There is a lot of apps doing interesting things here. I’m a fan of all of it!
Even more could probably benefit from it. Photoshop is notoriously complex, but a lot of us have familiarity with the things it can do. Seems like a perfect canidate for a fuzzy-search enabled command prompt!
Users might be able to take things into their own hands a bit here too. Alfred users could use the Menu Bar Search plugin which allows you to:
Search for and activate application menu items for the frontmost application. The workflow lists the menu items for the current application, filtering them by whatever is entered into Alfred.
Apps can easily have dozens of menu items, and this would make them all command prompt-able.
Standardization is also an interesting thing to consider. It seems some apps have followed each other. Command-Shift-P is the Sublime Text command runner, which was used by Chrome DevTools, and also by VS Code. I kinda like the Command-Space of Spotlight, but that doesn’t mean web-based apps should copy it. In fact, it means they can’t, because the OS would override it.
When UI is cumbersome or impractical, a command line makes good sense. Many apps benefit from offering both a UI and a command line, in various forms.