RobustToolbox icon indicating copy to clipboard operation
RobustToolbox copied to clipboard

Add toolshed ResPath completion suggestions

Open ElectroJr opened this issue 3 months ago • 0 comments

Currently the toolshed ResPath parser doesn't generate any completion options. This PR makes it default to using CompletionHelper.UserFilePath, and also defines some custom parsers that use other helper methods like CompletionHelper.ContentFilePath.

Other changes:

  • Added a cat command that uses the new parser
  • Toolshed's ResPath parser now accepts some paths without quotations E.g., both cat /a.yml and cat "/a.yml" work.
  • Added a new CompletionOptionFlags flag for forcing quoting of completion options
  • CompletionHelper path helpers now have an optional CompletionOptionFlags argument.
  • CompletionHelper.UserFilePath now has a trailing slash for partial directory options. This makes it consistent with CompletionHelper.ContentFilePath
    • I.e., when completing a sugestion for a folder, you don't have to manually enter the / anymore.
    • This was added after I recorded the video
    • Given that this is just meant to be for console completions, I don't think this should count as a breaking change, even if it technically might break command completion tests for forks (if there even are any)?

https://github.com/user-attachments/assets/3a979929-ca27-4e0b-a8c7-83ac157c11dd

ElectroJr avatar Sep 11 '25 06:09 ElectroJr