The bundle’s info.plist can now specify requiredCommands

This will apply to all items in the bundle so it’s questionable if it’s something we want to use, as it would not allow the user to run a “Help” command from the bundle without first setting up the requirements. OTOH setting requiredCommands for all but a few items in e.g. the Git bundle seems redundant — perhaps items should be able to eclipse keys from the bundle’s info.plist to effectively unset the requiredCommands for a select few items.
This commit is contained in:
Allan Odgaard
2013-05-26 15:40:03 +08:00
parent 0594b2c83e
commit 2df18d80b0

View File

@@ -30,6 +30,8 @@ namespace bundles
static std::vector<required_command_t> requirements (item_ptr const& item)
{
std::vector<required_command_t> res;
if(item->kind() != kItemTypeBundle)
res = requirements(item->bundle());
plist::array_t array;
if(plist::get_key_path(item->plist(), "requiredCommands", array))