]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Enable shell completion without set aliases
authorvrana <jakubv@fb.com>
Sun, 4 Mar 2012 07:26:16 +0000 (23:26 -0800)
committervrana <jakubv@fb.com>
Sun, 4 Mar 2012 11:14:54 +0000 (03:14 -0800)
Summary:
Otherwise it says after hitting Tab everytime:

> Warning:  Invalid argument supplied for foreach() in arcanist/src/workflow/shell-complete/ArcanistShellCompleteWorkflow.php on line 99

Test Plan: arc h<Tab>

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D1766

src/workflow/alias/ArcanistAliasWorkflow.php

index 2afa45bade2236aa86a58e0e0876d6dba953bbcb..7a1704e5fd59333bfed56deb5916e5d07ba41556 100644 (file)
@@ -59,7 +59,7 @@ EOTEXT
 
   public static function getAliases() {
     $config = self::readUserConfigurationFile();
-    return idx($config, 'aliases');
+    return idx($config, 'aliases', array());
   }
 
   private function writeAliases(array $aliases) {