Page MenuHomePhabricator

Add "command" vs "flag" corrector modes and refuse to correct "--start" into "restart"
ClosedPublic

Authored by epriestley on Jan 16 2019, 8:15 PM.
Tags
None
Referenced Files
F14798647: D19984.id47688.diff
Sat, Jan 25, 6:20 AM
Unknown Object (File)
Fri, Jan 24, 10:49 PM
Unknown Object (File)
Fri, Jan 17, 2:26 PM
Unknown Object (File)
Tue, Jan 14, 2:20 AM
Unknown Object (File)
Sat, Jan 11, 6:08 AM
Unknown Object (File)
Nov 28 2024, 2:16 AM
Unknown Object (File)
Nov 25 2024, 7:49 AM
Unknown Object (File)
Oct 29 2024, 10:01 AM
Subscribers
None

Details

Summary

Currently, we correct "bin/aphlict --start" into "bin/aphlict restart". When a command starts with "-", don't correct it since it's more far more likely a mistake (intended to be a flag or just not correct usage) than a typo.

Test Plan

Ran "bin/aphlict --start", "bin/aphlict restart", "bin/aphlict restatr".

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jan 16 2019, 8:17 PM

I think a simpler implementation of this would just be "don't correct any input beginning with -" since even flags are passed to us with the leading - stripped, but all the changes are internal to the class anyway and I think this interacts with changes in the wilds branch of Arcanist so it will probably need to be touched more heavily once that moves forward again anyway.

This revision was automatically updated to reflect the committed changes.