Homec4science

Treat non-string arguments as normal arguments in PhutilArgumentParser

Authored by James Rhodes <jrhodes@redpointsoftware.com.au> on Jan 8 2015, 04:29.

Description

Treat non-string arguments as normal arguments in PhutilArgumentParser

Summary:
This treats non-string arguments as "normal" arguments in PhutilArgumentParser (basically it prevents it from trying to detect - or -- prefixes).

In Omni, I use the PhutilArgumentParser to parse arguments, but Omni supports passing structured data (arrays, objects and other things with types) as arguments to builtins and Omni scripts.

Test Plan: Didn't see errors due to strncmp, etc. when passing arrays to builtins.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11138

Details

Committed
James Rhodes <jrhodes@redpointsoftware.com.au>Jan 8 2015, 04:29
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU7013bb4a19d2: Minor linter fix
Branches
Unknown
Tags
Unknown

Event Timeline

James Rhodes <jrhodes@redpointsoftware.com.au> committed rPHUd0bc7bf0d911: Treat non-string arguments as normal arguments in PhutilArgumentParser (authored by James Rhodes <jrhodes@redpointsoftware.com.au>).Jan 8 2015, 04:29