Page MenuHomePhabricator

How should "aliases" work in the .arcconfig file?
OpenPublic

Asked by mdchristoffer on Aug 3 2016, 1:38 PM.
Tags
None
Referenced Files
None
Subscribers
Tokens
"Like" token, awarded by mpadourek.

Details

I saw that this got implemented in D15342 and I saw the test plan there, but I couldn't figure out the syntax.

In CLI I am able to write an alias with

`arc alias test help'

Which is displayed when typing arc aliases:

Alias              Command                                  Type
arc test           arc help                                 Arcanist Command

However, in the .arcconfig file I added at the bottom:

"aliases": {
  "test2": "help"
}

But arc aliases seems broken:

Alias              Command                                  Type
arc test           arc help                                 Arcanist Command
arc test2          arc                                      Arcanist Command

and when i run arc test2 I get

Exception
Argument 1 passed to head() must be of the type array, string given, called in /usr/local/phabricator/arcanist/src/workflow/ArcanistAliasWorkflow.php on line 140 and defined
(Run with `--trace` for a full exception trace.)

What did I do wrong?