Dyalog / ride

Cross-platform IDE for Dyalog APL
https://dyalog.github.io/ride
MIT License
202 stars 31 forks source link

Spaces in )ED path causes incorrect path #1032

Closed DuckInTub closed 1 year ago

DuckInTub commented 1 year ago

Describe the issue you are having

Spaces in pathname while trying to file>open or )ed a file will cause RIDE to not find the file.

Did you connect to an already running interpreter or start the interpreter from RIDE?

Start an interpreter

How do you reproduce the issue?

Have a file with an absolute path containing a space somewhere. Open ride and use the menu: File>Open to try to edit the file. RIDE trouble with spaces in path

Paste the contents of Help → About (Shift+F1)

IDE:
  Version: 4.4.3732
  Electron: 13.6.9
  Chrome: 91.0.4472.164
  Node: 14.16.0
  Platform: Win32
  Date: 2022-10-11 16:52:29 +0100
  Git commit: 491568f297958f1db18eef72f0f70c8a9cb69eaa
  Preferences:{
    "colourScheme":"Mariana",
    "colourSchemes":"[{\"name\":\"Mariana\",\"theme\":\"dark\",\"styles\":\"asgn=fg:#6ab0f3 com=fg:#c0c0c0 diam=fg:#ffffa8 err=fg:#f2777a,bgo:1,U fn=fg:#d25b5b idm=U kw=fg:#ffeea6 lnum=bgo:0,fg:#777c85 mod=bgo:0.25,bg:#777c85 mtch=bgo:0.5,bg:#777c85,fgo:1 norm=bg:#404040,bgo:0,fg:#ffffff num=fg:#ff9900 op1=fg:#6ab0f3,fgo:1 op2=fg:#ffff00 quad=fg:#f2777a sel=bg:#6ab0f3,bgo:0.5 semi=fg:#6ab0f3 sqbr=fg:#6ab0f3 srch=bg:#e1a6f2,bgo:0.25 str=fg:#92d192 tc=bg:#777c85,bgo:0.25 tcpe=bg:#777c85,bgo:0.25 zld=fg:#fca369 scmd=fg:#ffeea6 ucmd=fg:#ffeea6,B vtt=bg:#777c85,bgo:1 ca=bg:#777c85,bgo:0.25,fg:#f2777a cm=bg:#2d2d2d,bgo:1,fg:#92d192 cv=bg:#2d2d2d,bgo:1,fg:#ffeea6 cvv=bg:#2d2d2d,bgo:1,fg:#76d4d6 ma=bg:#777c85,bgo:0.25,fg:#76d4d6 na=bg:#44475a,bgo:1,fg:#bd93f9 qor=bg:#f2777a,bgo:1,fg:#ffffff dc=bg:#7a3b3d,bgo:1 lbl=fg:#ffd479 glb=fg:#f2777a dfn=fg:#ffffff qdl=fg:#b3b9c5 cur=fg:#ff9900,fgo:1 acsl=bgo:0.25,bg:#e1a6f2 var=fg:#ffffff dfn1=fg:#ffffff\"}]",
    "confirmations":"{\"SaveFileOptionsExtension:.apl\":101,\"SaveFileOptionsExtension:.dyalog\":101}",
    "ilf":"0",
    "indentComments":"1",
    "kbdLocale":"en_GB",
    "lbarOrder":"← +-×÷*⍟⌹○!? |⌈⌊⊥⊤⊣⊢ =≠≤<>≥≡≢ ∨∧⍲⍱ ↑↓⊂⊃⊆⌷⍋⍒ ⍳⍸∊⍷∪∩~ /\\⌿⍀ ,⍪⍴⌽⊖⍉ ¨⍨⍣.∘⍤⍥@ ⍞⎕⍠⌸⌺⌶⍎⍕ ⋄⍝→⍵⍺∇& ¯⍬ ",
    "minimapEnabled":"1",
    "prefixKey":"§",
    "selectedExe":"C:\\Program Files\\Dyalog\\Dyalog APL-64 18.2 Unicode\\dyalog.exe",
    "zoom":"6"
  }

Interpreter:
  Version: 18.2.45405
  Platform: Windows-64
  Edition: Unicode/64
  Date: Mar 18 2022 at 14:58:25
aplteam commented 1 year ago

How is Ride supposed to tell the difference between two files and a single file with a space in between?

You must indicate this somehow, and as usual, it's the double quote that comes to the rescue:

)ed "file://C:\Users\icebl\Documents\Path with space\file.txt"
DuckInTub commented 1 year ago

Okay. But what about the File>Open menu? It only ever selects one file to be opened yet it doesn't automatically enclose the path with double qoutes.

aplteam commented 1 year ago

Yes, that's a bug