-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Issue
Tilde paths work on windows, but only using forward slash (/
) separated paths.
Filename completion works on windows, but only using backslash (\
) separated paths.
This means that autocomplete cannot be used with home-paths on windows, despite the machinery for both being implemented.
Examples
Assuming the file C:\Users\User\foo.txt
exists, micro:
- correctly autocompletes
C:\Users\User\foo
toC:\Users\User\foo.txt
- fails to autocomplete
C:/Users/User/foo
- fails to autocomplete
~\foo
- fails to autocomplete
~/foo
In addition:
- micro fails to open
~\foo.txt
(seemingly attempting to find some user\foo.txt
) - it does, however, successfully open
~/foo.txt
Proposed Solution:
Update homeString := strings.Split(path, "/")[0]
in util.go
to use string(os.PathSeparator)
instead of "/"
, as is already the case in autocomplete.go
(or vice versa), or otherwise come up with some solution to make both forward and backslashes work in both places on windows.
Metadata
Metadata
Assignees
Labels
No labels