-
-
Notifications
You must be signed in to change notification settings - Fork 51
feat(collider): allow tab completion for files #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
|
Both outputs are the same in this example. == WINDOWS ==
Components(
[
CurDir,
Normal(
"assets",
),
Normal(
"sprite",
),
Normal(
"sprite.png",
),
],
)
== POSIX ==
Components(
[
CurDir,
Normal(
"assets",
),
Normal(
"sprite",
),
Normal(
"sprite.png",
),
],
)This was meant to be a quick and solid fix. I'm still too much in the learning curve (after your two excellent courses, thank you very much) to be contributing to low level packages already. Would you mind placing the follow-up out of scope for this PR? |
You are most welcome. 😄
WHAT!?!? If the component detection is working with a Can you please run this and post the output? |
|
Output: Original path is: .\assets\textures\arenas\church_ctf_1\container-1.png
Parsed path is: ".\\assets\\textures\\arenas\\church_ctf_1\\container-1.png"
No, did not detect that path starts with assets.
Rejoined path is: "assets\\.\\assets\\textures\\arenas\\church_ctf_1\\container-1.png" |
|
🤦🏻♂️ Ah, okay, I hit the same problem when I try So, all we really need to do is to strip |
|
Actually I would argue that my fix simplified your code more than doing two separate replace actions and abstracting a simple replace into a separate function. Multiple slashes should also be considered a valid path. Recommend reverting to |
I believe I've found an even simpler solution! Standard library to the rescue. 😄
Canonicalization is handled deeper within Bevy/std already. |
CleanCut
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Nice. I like where this ended up.
|
Included in |
Changes
For example, in powershell an autocomplete always adds the
.\regardless of whether you typed it or not.resulting in
Couldn't find the file .\assets\textures\arenas\church_ctf_1\container-1.pngTests: