Move project manager into core init file

This commit is contained in:
Francesco Abbate
2020-12-08 16:57:57 +01:00
parent 9c7e477cd1
commit e88adc0567
5 changed files with 64 additions and 67 deletions
+15
View File
@@ -111,4 +111,19 @@ command.add(nil, {
doc:save(filename)
end
end,
["core:open-folder"] = function()
core.command_view:enter("Open Folder", function(text)
local path_stat = system.get_file_info(text)
if not path_stat or path_stat.type ~= 'dir' then
core.error("Cannot open folder %q", text)
return
end
if core.confirm_close_all() then
core.open_folder_project(text)
end
end, function(text)
return text == "" and core.recent_projects or common.dir_path_suggest(text)
end)
end,
})