splunk / splunk-sdk-python

Splunk Software Development Kit for Python
http://dev.splunk.com
Apache License 2.0
687 stars 369 forks source link

Break out search argument to option parsing for v2 custom search commands #392

Closed acharlieh closed 2 years ago

acharlieh commented 3 years ago

So I was wanting to write a custom search command, but for reasons of making things similar to existing commands, and because what I'm needing to take as positional parameters could have equals signs in them, I wanted to parse options that look like --optionName=optionValue instead of optionName=optionValue

Digging through the SDK I think I found the point where we were doing this, and wrapped it in a method so that I could override this parsing, but keep everything else passive for others who are already using the SDK.

I could see a future extension point where this entire parsing out options might be able to be overridden/modified, but I didn't have a need for that much customization yet.

acharlieh commented 3 years ago

Helps if I make the pull request against the correct branch.

fantavlik commented 2 years ago

Looks good to me since there are no functional changes for end users, good luck @acharlieh