public async Task OnExecute(CommandLineApplication app, IConsole console) { var utils = new WorkrootCommandUtils(app, console); IEnumerable <WorkRoot> workroots = await utils.GetWorkRootsAsync(CommandAborded); console.Write("Searching...."); GitLocalRepository[] repos = _localRepositoryService .Search(SearchText) .ToArray(); console.ClearLine(); if (repos.Count() == 0) { console.WriteLine($"\nNo repo found with search term: {SearchText}."); console.WriteLine($"Make sure you have configured your workroots correctly " + $"and you did index your workroots." + $"\nRun `boo index` to start indexing all your work roots." + $"\n\nSearched workroots: " + $"\n-------------------"); foreach (Settings.WorkRoot wr in workroots) { console.WriteLine($"{wr.Path} | {wr.Name}"); } return; } int index = 0; if (repos.Count() > 1) { index = console.ChooseFromList( repos.Select(x => $"{x.Name} ({x.WorkRoot})")); } GitLocalRepository?repo = repos[index]; await utils.ShowQuickActions(repo.WorkingDirectory); }
public async Task OnExecute(CommandLineApplication app, IConsole console) { var utils = new WorkrootCommandUtils(app, console); await utils.ShowQuickActions(_applicationContext.WorkingDirectory.FullName); }