Dev Watch

Blog archive

Developers Voice Opinions on Bash for Windows Features, Including '\' vs. '/'

"Backslash must die!" reads the No. 1 "hot idea" on Microsoft's User Voice site for "Command Prompt/Console/Bash on Ubuntu on Windows."

Yes, it's only been a week since Microsoft announced it was bringing the native Bash shell to Windows 10, (available today in a new Insider Preview build) but already thousands of users are voicing their opinions about how the new feature should work (and how the current Command Prompt/Windows Console can be improved), with the hottest debate right now concerning the use of forward slash vs. the backslash.

The issue brings to light the quirky history of the characters used to navigate file systems. Windows uses the backslash ("\") character to separate directories or folders ("C:\Users\Administrator"), while Linux and just about everything else uses the forward slash ("/var/log/messages"). Complicating things, the Windows Command Prompt that brings up the Windows Console lets you use either one, so you can "cd\users" or "cd/users" to change directories. Complicating things further, the backslash is used as an escape character in Linux to keep the shell from literally interpreting the following character.

Installing Bash Shows Use of Both Slashes
[Click on image for larger view.] Installing Bash Shows Use of Both Slashes (source: Microsoft)

With the native Bash shell coming to Windows, things get even more complicated, and some developers want to eliminate that complexity, with one named "chris" advocating killing the backslash. His post reads:

"Having paths following the / format on one system and \ on the other is a pain. Having both on one system is just awful (with Bash on Windows). Please allow us to use / styled paths everywhere."

Posted yesterday, that idea has garnered more than 1,170 votes and six comments. One such comment read:

"The forward slash has been a valid path separator in the DOS/Windows world since the very first version of DOS, all the way to today. Even in cmd.exe, a path enclosed in quotes may contain forward slashes, and in a few instances even the quotes aren't necessary, Support is a little uneven in the Windows shell, but at the OS level the forward slash is fully supported. Any time the forward slash is rejected, it's an application or shell bug."

Another user pointed the blame toward IBM, not Microsoft. That whole story is here. The TL;DR on that is: "It's because '/' was taken" [by the "switch" character].

Moving on to perhaps weightier matters, the No. 1 feature request so far is to provide a tabbed interface, with more than 2,030 votes.

"Great to see some of these improvements, especially the cut/copy/paste keyboard shortcuts," read that request. "However, I've been seeking for a way for the cmd window to have a tabbed interface for a while. So, for example, I can run a ping/tracert etc. in one tab, a chkdsk in another tab, and something else in a third, without having multiple windows open taking up screen real estate."

Two more requests also rank ahead of the backslash post, asking to "Please add SSH" to the Command Prompt (it's coming with Bash) and for "Bash-style autocomplete."

The User Voice site for "Command Prompt/Console/Bash on Ubuntu on Windows" is worth visiting yourself if only for the theatrical literary allowances taken by Microsoft employees in the introduction. Somehow, I can't see a post like the following being allowed under the Bill Gates regime:
Shrouded in the mists of time, the Windows console was created. For millenia, geeks and developers wrought their command-line tools. After a short time, a great lacking was noticed. And so, legions of ever intrepid command line mavens migrated to other shells and consoles, 'til but a stalwart few remained.

In Windows 10, with a small rumbling, the ancient, weary, Console heaves a great sigh and begins to tremble. New features appeared, but slow was the (aparrent) progress.

But then, in early 2016, from under a rock evolved a group of new console dev's. And then a PM. The journey to legitimacy has begun ... again! WE'RE BACK! AGAIN!

2016-04-04: We've just announced Bash on Ubuntu on Windows and, along with it, the first of a raft of improvements and new features coming to the Windows Console, benefitting PowerShell, Bash and many command-line tools. Bear with us while we clean-house a little and get everything ready while we make the Windows command-line cool again!

In the meantime, please post your asks, ideas, wants and needs below: We ARE listening, and we ARE grateful for your feedback!

@RichTurn_ms, Paul, Mike1 & Mike2.

This isn't your father's Microsoft. This is Shakespeare's Microsoft (albeit with some spelling and punctuation issues).

What do you think of the slash question? How would you like to see the Command Prompt improved? Comment here or drop me a line.

Posted by David Ramel on April 6, 2016