question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use forward slashes by default in Windows

See original GitHub issue

Summary of the new feature/enhancement

PowerShell aims to be cross-platform, but I have been having many issues operating on paths across both Windows and Linux. I understand the need to support \ in Windows for the foreseeable future, but I would at least like the default path character to be the same on both Windows and *nix, presumably by setting the default path delimiter to /. The current alternative is forcing users to normalize paths themselves with -replace "\\", "/" in their paths.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:53
  • Comments:96 (62 by maintainers)

github_iconTop GitHub Comments

22reactions
lzybkrcommented, Sep 12, 2019

I think it would be nice if path completion used the path separator that appears explicitly in the completion text, and if there is none, then default to the platform native separator.

So on Windows, c:\w completes to c:\Windows\ and c:/w completes to ‘c:/Windows/’.

I think this would cover a majority of the annoyances without requiring a configuration option, and is actually preferable because you occasionally might need the other form for whatever reason.

15reactions
KirkMunrocommented, Sep 16, 2019

Open status has lost its meaning.

Who says? That’s absolutely not true. An open issue is open, and a closed issue is closed. Those two distinctions have very clear meaning. I only look at closed issues if they are my own and I want to go back to check something. On a rare occasion I may go searching closed issues for discussions on a certain topic. But 90% or more of my time in issues is in open issues, as it should be. The only thing blurring the line between the two and making open issues lose their meaning is summarily closing them before they are resolved, like you have done with this issue.

(The discussion) is open to continue but will be closed.

Based on this approach to managing issues, you’re forcing people to lose the distinction between open and closed, such that they have to search all issues rather than focus on the open issues, which means checking the 2K open issues plus the 4K closed issues for discussions relevant to them instead of just focusing on the open issues. That is a broken, flawed issue management strategy.

As for the issue, it turns into infinite - initial request was “use forward slash on Windows”, then “compare paths”. What is next? Remoting?

That is ridiculous. The discussion is focused on dealing with Windows having a backslash as the default when you are writing scripts for cross platform. It has remained focused on that topic. You’re trying to make it sound like it isn’t focused at all.

@iSazonov, I agree that there are too many open issues; however, the fact that there are too many open issues does not mean we should be dismissive and shut conversation down prematurely on new issues. We must continue to encourage feedback and be open to discussion about PowerShell in open issues, and only close them once they are truly resolved. The volume of open issues must be dealt with differently.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a consistent way to make Windows use forward ...
I'd like Windows to use forward slashes like in UNIX instead of back slashes in the file paths. I have a several thousands...
Read more >
Using Forward or Backward Slashes Under Windows
You can use forward slashes ( / ) instead of backward slashes ( \ ) on Windows (as is the case with Linux®...
Read more >
Use forward slashes by default for includes
By default, Visual Studio uses backslashes when autocompleting C++ #includes. This makes no sense, and literally no one outside of ...
Read more >
Why does Windows use backslashes for paths and Unix ...
The underlying Windows API can accept either the backslash or slash to separate directory and file components of a path, but the Microsoft...
Read more >
Why Windows Uses Backslashes and Everything Else ...
Even if you're running a web server or FTP server on a Windows machine, they'll use forward slashes because that's what the protocol...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found