Sublime Forum

How to find a commands definition (specifically, current_result)

#1

I’d like to alter current_result to open the result in a different group.
Maybe there is already an argument that can be passed to do that, but how would I know the available arguments?

My guess is there is no such argument for it, so how can I find the definition so I can make a customised version of it? I know about PackageResourseViewer: Open Resource, but is there a way to search for current_result?

Or is there a way to get the resolved filepath that current_result would use so I can load it myself.

Thanks

0 Likes

#2

Some commands are implemented in core (closed source) and not as Python plugins. current_result is one of those, so we can’t see how it works or modify it

0 Likes

#3

Your welcome to add a feature request over on the issue tracker (if one doesn’t already exist) https://github.com/sublimehq/sublime_text/issues

Although, maybe @bschaaf could probably tell us if prev_result, next_result & current_result actually supports it or not.

0 Likes

#4

Those commands do not support any arguments currently.

0 Likes

#5

As a partial answer to your other question (though indeed it would not help in this case), CommandsBrowser allows you to, among other things, see a list of all of the commands that are defined by plugins and view their source.

You can combine that with OverrideAudit to make it easier to make changes. I’m somewhat biased as the author of the thing, but it contains the same core features as PackageResourceViewer does but without the (potentially) disastrous command that overrides everything in a package all at once, potentially without you realizing you did it.

Regardless of how you create an override, OverrideAudit will help you track it and make sure it’s not blocking you from receiving updates.

0 Likes

#6

Using OverrideAudit I found some expired overrides that I’ve now updated.
Thanks for the creating the package!

1 Like