[Suggestion]: Use forwardslash everywhere

Discussion related to "Everything" 1.5 Alpha.
Post Reply
DerekZiemba
Posts: 42
Joined: Thu Sep 27, 2018 4:46 pm

[Suggestion]: Use forwardslash everywhere

Post by DerekZiemba »

To use forward slash everywhere so that backslash can be used for escaping.
  • Display all paths with forward slash
  • When a path is pasted, auto-convert backslash to forward slash (unless backslash is escaped with backslash in front of it)
  • When a path is copied, use the forward slash representation.
    • Already works fine in Explorer
    • Works fine in every shell/terminal except cmd & that's being replaced by pwsh anyway.
    • Works in browsers
    • As a dev, I won't have to manually convert to forwardslash when pasting into a JSON file, etc.
  • Perhaps, to simplify things, go as far as making the internal path representation always be forward slash & converting as needed when interacting with win32 APIs.
Once that's settled, do what every other normal program does and use backslash as an escape hatch. Could then potentially open up more advanced globbing, with `\` escaping the literal representation

----------------------
However In the meantime, simpler things:
  • Add a setting to copy paths with forward slashes.
    Or to copy with backslashes already escaped, ie: `C:\\Windows\\System32\\some\\folder`
  • Some way to glob for numbers.
    • I'd suggest `#` but that's a valid path character.
    • `:` is unused but may conflict with the macro/property system.
    • `< | >` already work nicely (in the search bar, not sure if it works everywhere though like the Index Exclude List).
    • This leaves `"` as the only remaining invalid path character, but is already used to group things with spaces in them.
      But... If there was an escape char `\`.... a lot of options open up
horst.epp
Posts: 1446
Joined: Fri Apr 04, 2014 3:24 pm

Re: [Suggestion]: Use forwardslash everywhere

Post by horst.epp »

WE are in a Windows environment, which clearly uses \ for paths.
There are enough other ways to escape some characters without changing fundamental things.
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: [Suggestion]: Use forwardslash everywhere

Post by void »

I have put on my TODO list to add an option to convert \ to /

I will consider more globbing options and \ escaping.

Thank you for the suggestions.
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: [Suggestion]: Use forwardslash everywhere

Post by therube »

Just to note, some places/actions in Everything are already ambidextrous (accepting either or) /\.

When a path is copied, use the forward slash representation.
For a copy operation, was there already an option for that?
Such that display would be \, but paste would be / (or was that something different). [Must have been different. Nope, it's there.]
file_copy_full_path_with_forward_slashes_keys=


Works fine in every shell/terminal except cmd
Suppose it's possible you could run into other third party programs that, lets say, use funky operations for Open boxes or whatnot where / might not be accepted, or where a programs command-line options will not work with a path of, /paths/to.somewhere/abc.txt.

globbing
Can be tricky (to get it right).


And \\ can be ugly for one to look at (well, at least for me).
image.png
image.png (305.16 KiB) Viewed 32 times
meteorquake
Posts: 501
Joined: Thu Dec 15, 2016 9:44 pm

Re: [Suggestion]: Use forwardslash everywhere

Post by meteorquake »

I suspect what's needed is a universal setting that affects everything, that can then be tied to a shortcut (directly or via bookmark).
So whenever you need / or \\ or any other format you hit the shortcut and everything changes to that. You do whatever you need e.g. copying then hit a shortcut to return back to your default preference. Doing the same shortcut twice could toggle.
d
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: [Suggestion]: Use forwardslash everywhere

Post by void »

For a copy operation, was there already an option for that?
Such that display would be \, but paste would be / (or was that something different). [Must have been different. Nope, it's there.]
file_copy_full_path_with_forward_slashes_keys=
Use the UI to set a hotkey for File | Copy Full Path With Forward Slashes:
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Keyboard tab on the left.
  • To the right of Show commands containing, search for:
    copy
  • Select: File | Copy Full Path With Forward Slashes
  • Click Add....
  • Press a new keyboard shortcut (for example: Ctrl + Shift + C) and click OK.
  • Click OK.
A few issues I've found with converting \ to / are:
The shell doesn't like / (path to PIDls APIs don't work, so things like context menus are broken)
Windows doesn't like // UNC paths.
Common open dialogs do not like / in paths.

If I do add a option to convert \ to / it will be a display and copy option only.
Post Reply