Option for Forward Slash Directory Separators?

It would be nice if there was a way to make the directory path use forward slashes to display the current directory. This would make it much easier to copy and paste into Linux environments such as Cygwin/Msys/WSL shells where a backslash is the escape character.

I use these environments on a daily basis and this would help ease some pains without affecting anything as forward slashes are valid directory separators in Windows as well.

This is already supported.

If you set the button type to WSL, Opus will output paths in WSL's format.

Might put /mnt/c/Users/MyAccount/Desktop/ into the clipboard.

There is also Clipboard COPYNAMES=wsl for copying selected file/folder paths. (Does not require the button type to be set to WSL.)

1 Like

Hi! Thanks, but this isn't really what I mean.

Tooling in Linux environments or just daily use Windows utilities via the Linux environment has issues with C:\Program Files\Microsoft for example. As the path gets read as C:Program FilesMicrosoft

The issue comes in when you run a native Windows command line tool from a Linux environment, as the tool expects a valid Windows path (meaning /mnt/c/Program Files/ will not work) but the shell environment doesn't like backslashes, so I have to change C:\Program Files\Microsoft to either C:\\Program Files\\Microsoft or C:/Program Files/Microsoft.

Having the option to display / instead of \ would make it much easier when I'm copying a path for a utility that expects a Windows path. Or even an option to display \\ instead of \.
(Though I think a single forward slash is cleaner)

The default toolbars have an example button (which you could move elsewhere or put on a hotkey) for copying selected paths and doubling the backslashes:

You could modify that to use forward slashes instead, if preferred.

Getting the current path (instead of selected item paths) in the same format would be easy enough via a few lines of script code.

We aren't going to change how paths are displayed to match a different OS, but it's easy enough to put paths into the clipboard with any modifications made to them that you need.

I was mainly just thinking of an optional display change since \ / and \\ are all valid Windows directory separators, not a change to the default. Seems like it could be useful and it still conforms with Windows.

Anyways thanks, I didn't know about that button. I ended up writing a small rust program to monitor the clipboard while dopus is active and automatically convert paths copied to the clipboard instead.

1 Like

Would also chime in to say that is the same Windows OS, after I've learned that \ isn't the only valid separator, I've mostly dropped using it on Windows as well since / is a bit easier to type, so having visual display match everywhere what I type after would be nice

Maybe solve the whole problem by getting Linux to adapt and recognize \ as a separator?

The Windows is actually the oddball here. Historically the forward slashes / were the norm as directory separators (e.g., in Unix etc.), but the MS DOS used the forward slash / as a command line switch so it was "taken" and couldn't be used as a directory separator, so a backslash \ had to be used as a compromise.

Later the Windows came and for compatibility reasons it kept the backslash \.
So the Windows is the one that should change and adopt the forward slash / because the backslash \ is already used for escaping the special characters everywhere, including Windows (this is why you often need to pass \\ instead of \ to other programs even on Windows itself).

To its credit, the Windows is already starting to support the forward slash / everywhere, so in the end the Windows is the one that is "adapting" (as it should).