From: vrana Date: Sun, 4 Mar 2012 07:26:16 +0000 (-0800) Subject: Enable shell completion without set aliases X-Git-Tag: conduit-4~129 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=50cedc67ff5f844931b42bbeff6fa80b707f4a76;p=arcanist.git Enable shell completion without set aliases 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 Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1766 --- diff --git a/src/workflow/alias/ArcanistAliasWorkflow.php b/src/workflow/alias/ArcanistAliasWorkflow.php index 2afa45ba..7a1704e5 100644 --- a/src/workflow/alias/ArcanistAliasWorkflow.php +++ b/src/workflow/alias/ArcanistAliasWorkflow.php @@ -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) {