rjkroege / edwood

Go version of Plan9 Acme Editor
Other
383 stars 34 forks source link

Windows filename handling #485

Closed paul-lalonde closed 1 year ago

paul-lalonde commented 1 year ago

Add windows-specific handling of filename Looks. Uses regexp to find both filenames and quoted filenames followed by addresses. Simplifies the code dramatically, at the cost of likely (minimal) overhead, and trades comprehension of all the per-character parsing with regexp understanding.

codecov[bot] commented 1 year ago

Codecov Report

Merging #485 (0d03dc9) into master (e7c04a4) will increase coverage by 0.08%. The diff coverage is 91.66%.

:exclamation: Current head 0d03dc9 differs from pull request most recent head 89a8285. Consider uploading reports for the commit 89a8285 to get more accurate results

@@            Coverage Diff             @@
##           master     #485      +/-   ##
==========================================
+ Coverage   58.40%   58.48%   +0.08%     
==========================================
  Files          53       54       +1     
  Lines       10756    10761       +5     
==========================================
+ Hits         6282     6294      +12     
+ Misses       4040     4032       -8     
- Partials      434      435       +1     
Impacted Files Coverage Δ
regexp/runes.go 91.22% <60.00%> (-1.44%) :arrow_down:
expandfile.go 92.64% <92.64%> (ø)
look.go 43.42% <100.00%> (-14.90%) :arrow_down:

... and 1 file with indirect coverage changes

paul-lalonde commented 1 year ago

@rjkroege It's amusing that pulling code from look.go into expandfile.go reduces relative coverage in look.go and so blocks the commit. Yay?

paul-lalonde commented 1 year ago

I was contemplating letting this soak for a few days, but I don't think we have any actual windows users - it's just too unusable without this change. Next will be to get win, B, and E somehow deployed. With win I could actually start using this as my daily driver on Windows.

rjkroege commented 1 year ago

I have a mostly complete B in Go. I should add to the source tree. I think that win is harder. Could you run a WSL win? (Maybe u-root/u-root: A fully Go userland with Linux bootloaders! u-root can create a one-binary root file system (initramfs) containing a busybox-like set of tools written in Go. could provide the shell etc. on Windows?)

paul-lalonde commented 1 year ago

No, I need to build win. It's time.

On Wed, Apr 26, 2023, 12:49 p.m. Robert Kroeger @.***> wrote:

I have a mostly complete B in Go. I should add to the source tree. I think that win is harder. Could you run a WSL win? (Maybe u-root/u-root: A fully Go userland with Linux bootloaders! u-root can create a one-binary root file system (initramfs) containing a busybox-like set of tools written in Go. https://github.com/u-root/u-root could provide the shell etc. on Windows?)

— Reply to this email directly, view it on GitHub https://github.com/rjkroege/edwood/pull/485#issuecomment-1523957681, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ6RUGKGKEOUEH3DOCZC53XDF34DANCNFSM6AAAAAAXMZNUAI . You are receiving this because you authored the thread.Message ID: @.***>