5 implementations of IShellProvider
System.CommandLine.StaticCompletions (5)
shells\BashShellProvider.cs (1)
12public class BashShellProvider : IShellProvider
shells\FishShellProvider.cs (1)
8public class FishShellProvider : IShellProvider
shells\NuShellShellProvider.cs (1)
8public class NushellShellProvider : IShellProvider
shells\PowershellShellProvider.cs (1)
11public class PowershellShellProvider : IShellProvider
shells\ZshShellProvider.cs (1)
9public class ZshShellProvider : IShellProvider
17 references to IShellProvider
dotnet.Tests (2)
CompletionTests\DotnetCliSnapshotTests.cs (2)
17var provider = CompletionsCommand.DefaultShells.Single(x => x.ArgumentName == shellName); 34public static IEnumerable<object[]> ShellNames = CompletionsCommand.DefaultShells.Select<IShellProvider, object[]>(x => [x.ArgumentName]);
System.CommandLine.StaticCompletions (11)
CompletionsCommand.cs (11)
14public static IShellProvider[] DefaultShells = [ 28public CompletionsCommand(IEnumerable<IShellProvider>? supportedShells = null, string commandName = "completions", string? commandDescription = null) : this((supportedShells ?? DefaultShells).ToDictionary(s => s.ArgumentName, StringComparer.OrdinalIgnoreCase), commandName, commandDescription ?? Strings.CompletionsCommand_Description) 31private CompletionsCommand(Dictionary<string, IShellProvider> shellMap, string commandName, string commandDescription) : base(commandName, commandDescription) 33var shellArg = new Argument<IShellProvider>("shell") 59static IShellProvider LookupShellFromEnvironment(Dictionary<string, IShellProvider> shellMap) 71if (shellMap.TryGetValue(shellPath, out var shellProvider)) 81static Action<Parsing.ArgumentResult> OnlyAcceptSupportedShells(Dictionary<string, IShellProvider> shellMap) 97static Func<CompletionContext, IEnumerable<CompletionItem>> CreateCompletions(Dictionary<string, IShellProvider> shellMap) 109public GenerateScriptCommand(Argument<IShellProvider> shellArg) 115IShellProvider shell = args.GetValue(shellArg)!; // this cannot be null due to the way the shellArg is defined/configured
System.CommandLine.StaticCompletions.Tests (4)
BashShellProviderTests.cs (1)
14private IShellProvider provider = new BashShellProvider();
PowershellProviderTests.cs (1)
15private IShellProvider provider = new PowershellShellProvider();
VerifyExtensions.cs (1)
12public static async Task Verify(this IShellProvider provider, Command command, ITestOutputHelper log, [CallerFilePath] string sourceFile = "")
ZshShellProviderTests.cs (1)
15private IShellProvider _provider = new ZshShellProvider();