]> khamidou — GitHub mirrors - arcanist.git/commit
Correct spelling for "arc" commands
authorepriestley <git@epriestley.com>
Mon, 31 Dec 2012 00:01:59 +0000 (16:01 -0800)
committerepriestley <git@epriestley.com>
Mon, 31 Dec 2012 00:01:59 +0000 (16:01 -0800)
commit59e13f666fd134d5e8928c9b8c1ed2aca5debf35
treeb8cd0b322e9790beb5dbc950ad048b00da5104db
parent0b833c2f0265bd418b69ded503563a95cbab8c52
Correct spelling for "arc" commands

Summary:
I type "arc brnach" about 300 times per day.

  - Allow arc commands to be specified by unique prefix ("exp" for "export", "lib" for "liberate").
  - Allow arc commands to be specified by unique levenshtein edit distance <= 2 ("brnach" for "branch", "halp" for "help", "ptach" for "patch").
  - Reorganize code out of "arcanist.php".

I think this will be uncontentious because arc commands are rarely destructive, but if people complain we can either require certain commands be typed exactly (maybe "land"?) or allow this feature to be disabled in configuration.

Test Plan:
  $ arc br
  Usage Exception: Unknown command 'br'. Try 'arc help'.

  Did you mean:
      branch
      browse

  $ arc brnachh
  Usage Exception: Unknown command 'brnachh'. Try 'arc help'.
  $ arc brnach
  (Assuming 'brnach' is the British spelling of 'branch'.)
     doc-security        No Revision      security
     sms                 Needs Revision   D319: Add SMS support to Phabricator
     phxtag              No Revision      derp
     arantag             No Revision      derp
  ...

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran
Differential Revision: https://secure.phabricator.com/D4305
scripts/arcanist.php
src/configuration/ArcanistConfiguration.php