bitburner-official / bitburner-src

Bitburner source code.
Other
809 stars 266 forks source link

Terminal: tab auto-complete doesn't correct folder casing #1708

Open alainbryden opened 5 days ago

alainbryden commented 5 days ago

Steps to reproduce:

  1. Have a folder created with upper-case letters, such as "Tasks/", and some scripts in this folder. image

  2. Type the folder name incorrectly as all-lower-case ("tasks/") then proceed to tab-autocomplete a file name. Note that the auto-complete will correct the case of the filename if you typed any letters in the incorrect case, but it will not correct the case of the folder name: image

  3. This will now open a new file (in a new folder) rather than the existing file you tab-auto-completed: image

Acceptable solutions (IMO):

A side-effect of the current behaviour (ignoring folder casing when auto-completing) is that if the user creates two folders with the same name but different casing, these folders are merged in the auto-complete box. In this case, since each folder now has a file named "backdoor-all-servers.js", this entry appears twice: image

gmcew commented 1 day ago

For reference for any potential PR on this; there's a few other autocomplete problems at #522 and #1473 which may be worth considering. As far as I can see this is the first issue referencing automplete's case-sensitivity, though I might have missed a previous mention.