diff --git a/.agents/skills/pretty-console-expert/SKILL.md b/.agents/skills/pretty-console-expert/SKILL.md index a96f758..138a3b6 100755 --- a/.agents/skills/pretty-console-expert/SKILL.md +++ b/.agents/skills/pretty-console-expert/SKILL.md @@ -7,18 +7,13 @@ description: Expert workflow for using PrettyConsole correctly and efficiently i ## Core Workflow -1. Verify the installed PrettyConsole version before coding. -- Read `Directory.Packages.props`, `*.csproj`, and/or run `dotnet list package`. -- Keep implementation compatible with the installed version; do not "fix" compilation by downgrading unless the user explicitly requests downgrading. - -2. Bring extension APIs into scope: +1. Bring extension APIs into scope: ```csharp using PrettyConsole; -using static System.Console; // optional ``` -3. Choose APIs by intent. +2. Choose APIs by intent. - Styled output: `Console.WriteInterpolated`, `Console.WriteLineInterpolated`. - Inputs/prompts: `Console.TryReadLine`, `Console.ReadLine`, `Console.Confirm`, `Console.RequestAnyInput`. - Dynamic rendering and line control: `Console.Overwrite`, `Console.ClearNextLines`, `Console.SkipLines`, `Console.NewLine`. @@ -27,7 +22,7 @@ using static System.Console; // optional - Menus/tables: `Console.Selection`, `Console.MultiSelection`, `Console.TreeMenu`, `Console.Table`. - Low-level override only: use `Console.Write(...)` / `Console.WriteLine(...)` span+`ISpanFormattable` overloads only when you intentionally bypass the handler for a custom formatting pipeline. -4. Route output deliberately. +3. Route output deliberately. - Keep normal prompts, menus, tables, durable user-facing output, and machine-readable non-error output on `OutputPipe.Out` unless there is a specific reason not to. - Use `OutputPipe.Error` for transient live UI and for actual errors/diagnostics/warnings so stdout stays pipe-friendly and error output remains distinguishable. - `LiveConsoleRegion` should usually live on `OutputPipe.Error` in interactive CLIs. Keep the durable lines that must coordinate with it flowing through the region instance instead of writing directly to the same pipe elsewhere. @@ -51,7 +46,7 @@ using static System.Console; // optional - Prefer `Color`, `Markup`, and guarded `AnsiToken` in styled output. Use `Color.*` for token-based color APIs such as `ProgressBar`, `Spinner`, `TypeWrite`, and `LiveConsoleRegion.RenderProgress`. Keep `ConsoleColor` for APIs that explicitly require it, such as low-level span writes or `Console.SetColors`. - Route transient UI (spinner/progress/overwrite loops) to `OutputPipe.Error` to keep stdout pipe-friendly, and use `OutputPipe.Error` for genuine errors/diagnostics. Keep ordinary non-error interaction flow on `OutputPipe.Out`. - Spinner/progress/overwrite output is caller-owned after rendering completes. Explicitly remove it with `Console.ClearNextLines(totalLines, pipe)` or intentionally keep the region with `Console.SkipLines(totalLines)`. -- `LiveConsoleRegion` is the right primitive when durable line output and transient status must interleave over time. It is line-oriented: use `WriteLine`, not inline writes, for cooperating durable output above the retained region. +- `LiveConsoleRegion` is the right primitive when durable line output and transient status must interleave over time. It is line-oriented: use `WriteLine`, not inline writes, for cooperating durable output above the retained region. Disposing the region clears the retained snapshot automatically; call `Clear()` only when the region should disappear before the object itself is disposed and you still want to reuse that same instance later. - Only use the bounded `Channel` snapshot pattern when multiple producers must update the same live region at high frequency. For single-producer or modest-rate updates, keep the rendering loop simple. ## Practical Patterns @@ -114,12 +109,12 @@ live.Render($"Resolving graph"); live.WriteLine($"Updated package-a"); live.RenderProgress(65, (builder, out handler) => handler = builder.Build(OutputPipe.Error, $"Compiling")); -live.Clear(); +live.Render($"Linking"); ``` ## Reference File -Read [references/v5-api-map.md](references/v5-api-map.md) when you need exact usage snippets, migration mapping from old APIs, or a compile-fix checklist. +Read [references/v6-api-map.md](references/v6-api-map.md) when you need exact usage snippets, migration mapping from old APIs, or a compile-fix checklist. Read [references/testing-with-consolecontext.md](references/testing-with-consolecontext.md) when the task involves testing a PrettyConsole-based CLI or command handler. If public API usage changes in the edited project, ask whether to update `README.md` and changelog/release-notes files. diff --git a/.agents/skills/pretty-console-expert/references/v5-api-map.md b/.agents/skills/pretty-console-expert/references/v6-api-map.md similarity index 63% rename from .agents/skills/pretty-console-expert/references/v5-api-map.md rename to .agents/skills/pretty-console-expert/references/v6-api-map.md index dc71729..a6082c7 100755 --- a/.agents/skills/pretty-console-expert/references/v5-api-map.md +++ b/.agents/skills/pretty-console-expert/references/v6-api-map.md @@ -1,30 +1,16 @@ -# PrettyConsole v5 API Map +# PrettyConsole v6 API Map -Use this file when implementing or reviewing PrettyConsole usage so code compiles against modern APIs and keeps allocation-conscious patterns. +Use this file when implementing or reviewing PrettyConsole usage so code compiles against the current surface and keeps the library's allocation-conscious patterns. -## 1. Version First - -Read installed version before coding: - -```bash -dotnet list package -rg -n "PrettyConsole" --glob "*.csproj" . -# optionally also check central package management if present: -# rg -n "PrettyConsole" Directory.Packages.props -``` - -If version and request conflict, keep the installed version and adapt code accordingly. - -## 2. Namespace and Setup +## 1. Namespace and Setup ```csharp using PrettyConsole; -using static System.Console; // optional ``` PrettyConsole methods are extension members on `System.Console`. -## 3. Correct Modern APIs +## 2. Correct v6 APIs - Styled writes: - `Console.WriteInterpolated(...)` @@ -39,6 +25,11 @@ PrettyConsole methods are extension members on `System.Console`. - `Console.ClearNextLines(...)` - `Console.SkipLines(...)` - `Console.NewLine(...)` +- Live retained UI: + - `LiveConsoleRegion.WriteLine(...)` + - `LiveConsoleRegion.Render(...)` + - `LiveConsoleRegion.RenderProgress(...)` + - `LiveConsoleRegion.Clear()` - Progress: - `ProgressBar.Update(...)` - `ProgressBar.Render(...)` @@ -52,9 +43,25 @@ PrettyConsole methods are extension members on `System.Console`. ### Output routing - Keep prompts, menus, tables, final user-facing output, and machine-readable non-error output on `OutputPipe.Out` unless you intentionally need a different split. -- Use `OutputPipe.Error` for transient live UI and for actual errors/diagnostics/warnings so stdout remains pipe-friendly and error output stays distinct. +- Use `OutputPipe.Error` for transient live UI and for actual errors, diagnostics, and warnings so stdout remains pipe-friendly and error output stays distinct. +- `LiveConsoleRegion` should usually live on `OutputPipe.Error` in interactive CLIs. Keep durable lines that must coordinate with it flowing through the region instance instead of writing directly to the same pipe elsewhere. +- Disposing a `LiveConsoleRegion` clears the retained snapshot and then permanently closes the region. Call `Clear()` only when you want to remove the current snapshot but keep the region instance reusable for later renders. - Avoid mixing a single interactive exchange across `Out` and `Error` unless the split is intentional. +### Interpolated-handler styling model + +- Prefer `Color`, `Markup`, and guarded `AnsiToken` inside interpolation holes: + + ```csharp + Console.WriteLineInterpolated($"{Color.Green}ready{Color.Default}"); + Console.WriteLineInterpolated($"{Markup.Bold}build{Markup.ResetBold} complete"); + ``` + +- `ConsoleColor` interpolation still works for compatibility, but `Color.*` is the primary v6 surface for styled output. +- For APIs that explicitly take `AnsiToken`, use `Color.*` or `new AnsiToken("...")`. +- Do not embed raw escape sequences directly in string literals. Keep ANSI inside interpolation holes so PrettyConsole can isolate the token safely. +- If you must branch on ANSI capability outside the guarded token model, use `ConsoleContext.IsAnsiSupported`. + ### Interpolated-handler special formats - `TimeSpan` with `:duration`: @@ -84,31 +91,32 @@ Use these only when intentionally bypassing the interpolated handler for a custo ### New lines and blank lines - Use `Console.NewLine(pipe)` when the intent is only to end the current line or emit a blank line. -- Do not use `Console.WriteLineInterpolated($"")` or payloads like `$"{ConsoleColor.Default}"` just to force a newline. +- Do not use `Console.WriteLineInterpolated($"")` or reset-only payloads such as `$"{Color.Default}"` just to force a newline. - Use `WriteLineInterpolated(...)` when you are actually writing content and also want the trailing newline. -## 4. Old -> New Migration Table +## 3. Old -> New Migration Table - `IndeterminateProgressBar` -> `Spinner` - `AnimationSequence` -> `Pattern` - `ProgressBar.WriteProgressBar` -> `ProgressBar.Render` - `PrettyConsoleExtensions` -> `ConsoleContext` -- Legacy `ColoredOutput`/`Color` types -> `ConsoleColor` helpers and tuples +- Legacy `ColoredOutput`/`Color` types -> `Color`, `Markup`, `AnsiToken`, and `ConsoleColor` compatibility where the API explicitly asks for it +- `Markup` and `AnsiColors` raw string expectations -> guarded `AnsiToken` values -## 5. Compile-Safe Patterns +## 4. Compile-Safe Patterns ### Styled output ```csharp -Console.WriteInterpolated($"[{ConsoleColor.Cyan}info{ConsoleColor.Default}] {message}"); -Console.WriteLineInterpolated(OutputPipe.Error, $"{ConsoleColor.Red}error{ConsoleColor.Default}: {message}"); +Console.WriteInterpolated($"[{Color.Cyan}info{Color.Default}] {message}"); +Console.WriteLineInterpolated(OutputPipe.Error, $"{Color.Red}error{Color.Default}: {message}"); Console.NewLine(); ``` ### Typed input ```csharp -if (!Console.TryReadLine(out int port, $"Port ({ConsoleColor.Green}5000{ConsoleColor.Default}): ")) +if (!Console.TryReadLine(out int port, $"Port ({Color.Green}5000{Color.Default}): ")) port = 5000; ``` @@ -126,9 +134,9 @@ static string PromptSelection(string title, string[] options) { while (selection.Length == 0) { Console.Overwrite(() => { - selection = Console.Selection(options, $"{ConsoleColor.Cyan}{title}{ConsoleColor.DefaultForeground}:"); + selection = Console.Selection(options, $"{Color.Cyan}{title}{Color.DefaultForeground}:"); if (selection.Length == 0) - Console.WriteLineInterpolated(OutputPipe.Error, $"{ConsoleColor.Red}Invalid choice."); + Console.WriteLineInterpolated(OutputPipe.Error, $"{Color.Red}Invalid choice.{Color.Default}"); }, lines: options.Length + 3, pipe: OutputPipe.Out); } @@ -152,7 +160,7 @@ var workTask = Task.Run(async () => { var spinner = new Spinner(); await spinner.RunAsync(workTask, (builder, out handler) => { var current = Math.Min(Volatile.Read(ref step), steps.Length - 1); - handler = builder.Build(OutputPipe.Error, $"Current step: {ConsoleColor.Green}{steps[current]}"); + handler = builder.Build(OutputPipe.Error, $"Current step: {Color.Green}{steps[current]}"); }); ``` @@ -162,20 +170,34 @@ Use this when the spinner header should reflect concurrently changing state with ```csharp Console.Overwrite(percent, static current => { - ProgressBar.Render(OutputPipe.Error, current, ConsoleColor.Cyan, maxLineWidth: 40); + ProgressBar.Render(OutputPipe.Error, current, Color.Cyan, maxLineWidth: 40); Console.NewLine(OutputPipe.Error); - Console.WriteInterpolated(OutputPipe.Error, $"Downloading assets... {ConsoleColor.Cyan}{current}"); + Console.WriteInterpolated(OutputPipe.Error, $"Downloading assets... {Color.Cyan}{current}{Color.Default}"); }, lines: 2, pipe: OutputPipe.Error); ``` Prefer this shape for live `status + progress` regions. It keeps the state explicit, avoids closure allocations, and makes the rendered height obvious. +### Retained live region + +```csharp +using var live = new LiveConsoleRegion(OutputPipe.Error); + +live.Render($"Resolving graph"); +live.WriteLine($"Fetched package-a"); +live.RenderProgress(65, (builder, out handler) => + handler = builder.Build(OutputPipe.Error, $"Compiling {Color.Cyan}core{Color.Default}")); +live.Render($"Linking {Color.Cyan}core{Color.Default}"); +``` + +Prefer `LiveConsoleRegion` when durable lines must keep flowing above a pinned transient line on the same pipe over time. + ### Overwrite loop cleanup ```csharp Console.Overwrite(() => { Console.WriteLineInterpolated(OutputPipe.Error, $"Running..."); - ProgressBar.Render(OutputPipe.Error, percent, ConsoleColor.Cyan); + ProgressBar.Render(OutputPipe.Error, percent, Color.Cyan); }, lines: 2, pipe: OutputPipe.Error); Console.ClearNextLines(2, OutputPipe.Error); @@ -221,12 +243,13 @@ Why this works: For single-producer or modest-rate updates, prefer a simpler render loop without the channel. -## 6. Performance Checklist +## 5. Performance Checklist - Prefer interpolated handlers over string concatenation. -- Treat span/formattable `Write`/`WriteLine` overloads as advanced escape hatches, not default app-level APIs. -- Use `Console.NewLine(pipe)` for bare line breaks instead of empty/reset-only `WriteLineInterpolated(...)` calls. -- Keep ANSI/decorations in interpolation holes, not raw literal spans. -- Use `OutputPipe.Error` for transient rendering and genuine errors/diagnostics, but keep ordinary non-error interaction flow on `OutputPipe.Out`. +- Treat span/formattable `Write` and `WriteLine` overloads as advanced escape hatches, not default app-level APIs. +- Use `Console.NewLine(pipe)` for bare line breaks instead of empty or reset-only `WriteLineInterpolated(...)` calls. +- Keep ANSI and decorations in interpolation holes, not raw literal spans. +- Use `Color.*` for token-based color APIs such as `ProgressBar`, `Spinner`, `TypeWrite`, and `LiveConsoleRegion.RenderProgress`. +- Use `OutputPipe.Error` for transient rendering and genuine errors or diagnostics, but keep ordinary non-error interaction flow on `OutputPipe.Out`. - Clean up live UI explicitly after the last frame with `ClearNextLines(...)` or keep it intentionally with `SkipLines(...)`. - Avoid introducing wrapper abstractions when direct PrettyConsole APIs already solve the task. diff --git a/AGENTS.md b/AGENTS.md index 766ec5e..68df2be 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -49,7 +49,6 @@ - `files`: defaults to `false`. - `directories`: defaults to `false`. - `root`: defaults to `"."`. - - `highlightColor`: defaults to `ConsoleColor.Green`. - Current arguments and defaults from `Commands.DeleteAsync`: - `query`: required positional argument. - `regex`: defaults to `false`. @@ -59,6 +58,7 @@ - `files`: defaults to `false`. - `directories`: defaults to `false`. - `root`: defaults to `"."`. + - `noProgress`: defaults to `false`. - `apply`: defaults to `false`. - Short aliases currently exposed by the command surface: - `-r` => `--regex` @@ -67,7 +67,6 @@ - `-s` => `--system` - `-f` => `--files` - `-d` => `--directories` - - `-c` => `--highlight-color` - If `plain` is `true`, the CLI writes the full path directly and does not emit PrettyConsole color/escape sequences for match sections. - If `absolute` is `false`, search output is relative to `root`. - If `null` is `true`, the CLI emits plain absolute NUL-terminated paths and bypasses highlight rendering. @@ -75,7 +74,7 @@ - An empty search query matches all eligible entries under `root`. - `seek delete` previews candidates by default, prints absolute candidate paths, and only deletes when `apply` is `true`. - `seek delete` collapses descendants under matched directories before preview or apply. -- `seek delete` deletes sequentially, prints one `SUCCESS` or `FAIL` line per candidate in apply mode, and returns exit code `1` if any deletion fails. +- `seek delete` deletes sequentially, prints one `OK` or `FAIL` line per candidate in apply mode, and returns exit code `1` if any deletion fails. - `seek check-for-updates` compares `ConsoleApp.Version` against the latest published NuGet package version and prints either update instructions or an up-to-date message. - Worker count is not user-configurable today. `FileSystemSearch` computes it as `Math.Max(1, Environment.ProcessorCount - 1)`. - Results are rendered to standard output through `PrettyConsole` when highlighting is enabled. @@ -137,7 +136,7 @@ - AOT compatibility is enforced in project metadata via `IsAotCompatible` and `VerifyReferenceAotCompatibility`. - Optional strong-name signing for the CLI assembly is enabled by passing `StrongNameKeyPath` at build or pack time. - Package identity is `Seek`. -- Tool packages are published for `win-x64`, `win-arm64`, `linux-x64`, `linux-arm64`, `osx-x64`, `osx-arm64`, and `any` via `ToolPackageRuntimeIdentifiers`. +- Tool packages are published for `linux-x64`, `linux-arm64`, `osx-x64`, `osx-arm64`, and `any` via `ToolPackageRuntimeIdentifiers`. - The package embeds: - the repository `README.md` as package readme - `assets/seek-icon.png` as package icon, packed to `seek-icon.png` diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c80799..df3a765 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.2.1 + +- Refreshed Seek's CLI framework integration and console dependency stack without changing the command surface or output contracts. + ## 1.2.0 - Seek is now available on WinGet via `winget install dusrdev.Seek`. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a611c95..99482c0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ ```bash dotnet build Seek.slnx -dotnet test Seek.slnx +dotnet test --solution Seek.slnx ``` ## Local CLI usage diff --git a/README.md b/README.md index 82d925e..55611da 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ seek delete ".*\\.tmp$" --regex --apply `seek delete` uses the same search-selection options as the default search command: `--regex`, `--case-sensitive`, `--hidden`, `--system`, `--files`, `--directories`, and `--root`. -Without `--apply`, `seek delete` prints the final candidate list and a `No changes were made...` hint. With `--apply`, it deletes each candidate sequentially and prints a `SUCCESS` or `FAIL` status line for each path. +Without `--apply`, `seek delete` prints the final candidate list and a `No changes were made...` hint. With `--apply`, it deletes each candidate sequentially and prints an `OK` or `FAIL` status line for each path. Add `--no-progress` to disable the live progress bar during apply runs. @@ -144,4 +144,5 @@ Other useful options: ```bash dotnet build Seek.slnx +dotnet test --solution Seek.slnx ``` diff --git a/global.json b/global.json new file mode 100644 index 0000000..3140116 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "test": { + "runner": "Microsoft.Testing.Platform" + } +} diff --git a/src/Seek.Cli/Commands.Delete.cs b/src/Seek.Cli/Commands.Delete.cs index baa69f2..d59728d 100644 --- a/src/Seek.Cli/Commands.Delete.cs +++ b/src/Seek.Cli/Commands.Delete.cs @@ -10,39 +10,23 @@ internal static partial class Commands { /// /// Delete matching files and directories. /// - /// Search query - /// -r, Treat the query as regex pattern - /// Perform a case sensitive search - /// -h, Include hidden files and folders - /// -s, Include system files and folders - /// -f, Match only against files - /// -d, Match only against directories /// Disable progress reporting - /// The root path from which to scan /// Perform the deletion instead of previewing candidates /// /// - public static async Task DeleteAsync( - [Argument] string query, - bool regex, - bool caseSensitive, - bool hidden, - bool system, - bool files, - bool directories, + public static async Task DeleteAsync([AsParameters] SearchParameters @params, bool noProgress, - string root = ".", - bool apply = false, + bool apply, CancellationToken cancellationToken = default) { var search = CreateFileSystemSearch( - query, - regex, - caseSensitive, - hidden, - system, - files, - directories, - root, + @params.Query, + @params.Regex, + @params.CaseSensitive, + @params.Hidden, + @params.System, + @params.Files, + @params.Directories, + @params.Root, cancellationToken); List collapsedCandidates = await CollectDeleteCandidatesAsync(search.SearchAsync(), cancellationToken).ConfigureAwait(false); diff --git a/src/Seek.Cli/Commands.Search.cs b/src/Seek.Cli/Commands.Search.cs index 71220a4..7983f20 100644 --- a/src/Seek.Cli/Commands.Search.cs +++ b/src/Seek.Cli/Commands.Search.cs @@ -8,43 +8,30 @@ namespace Seek.Cli; internal static partial class Commands { /// - /// Seek is a fast filesystem search tool for files and directories by David Shnayder (@dusrdev). + /// Seek is a fast filesystem searcher made by David Shnayder (@dusrdev). + /// + /// Search the filesystem for a query /// - /// Search query - /// -r, Treat the query as regex pattern - /// Perform a case sensitive search /// -p, Disable matching section highlight /// Emit absolute paths instead of paths relative to the selected root /// Emit machine-readable NUL-terminated paths for safe piping, implies --plain and --absolute - /// -h, Include hidden files and folders - /// -s, Include system files and folders - /// -f, Match only against files - /// -d, Match only against directories - /// The root path from which to scan /// /// public static async Task SearchAsync( - [Argument] string query, - bool regex, - bool caseSensitive, + [AsParameters] SearchParameters @params, bool plain, bool absolute, bool @null, - bool hidden, - bool system, - bool files, - bool directories, - string root = ".", CancellationToken cancellationToken = default) { var search = CreateFileSystemSearch( - query, - regex, - caseSensitive, - hidden, - system, - files, - directories, - root, + @params.Query, + @params.Regex, + @params.CaseSensitive, + @params.Hidden, + @params.System, + @params.Files, + @params.Directories, + @params.Root, cancellationToken); Action outputHandler = (@null, plain) switch { diff --git a/src/Seek.Cli/Program.cs b/src/Seek.Cli/Program.cs index 079be82..ae05b7a 100644 --- a/src/Seek.Cli/Program.cs +++ b/src/Seek.Cli/Program.cs @@ -1,7 +1,7 @@ using ConsoleAppFramework; using Seek.Cli; -ConsoleApp.Version = "1.2.0"; +ConsoleApp.Version = "1.2.1"; var app = ConsoleApp.Create(); app.UseFilter(); diff --git a/src/Seek.Cli/SearchParameters.cs b/src/Seek.Cli/SearchParameters.cs new file mode 100644 index 0000000..8acaa10 --- /dev/null +++ b/src/Seek.Cli/SearchParameters.cs @@ -0,0 +1,25 @@ +using ConsoleAppFramework; + +namespace Seek.Cli; + +/// +/// Common search based parameters +/// +/// Search query +/// -r, Treat the query as regex pattern +/// Perform a case sensitive search +/// -h, Include hidden files and folders +/// -s, Include system files and folders +/// -f, Match only against files +/// -d, Match only against directories +/// The root path from which to scan +internal sealed record SearchParameters( + [Argument] string Query, + bool Regex, + bool CaseSensitive, + bool Hidden, + bool System, + bool Files, + bool Directories, + string Root = "." +); \ No newline at end of file diff --git a/src/Seek.Cli/Seek.Cli.csproj b/src/Seek.Cli/Seek.Cli.csproj index af7302a..00beb39 100644 --- a/src/Seek.Cli/Seek.Cli.csproj +++ b/src/Seek.Cli/Seek.Cli.csproj @@ -22,7 +22,7 @@ 0 true false - 1.2.0 + 1.2.1 true https://github.com/dusrdev/Seek git @@ -49,9 +49,8 @@ - - Added WinGet distribution via winget install dusrdev.Seek. - - Unified CLI colors and removed --highlight-color. - - Added seek delete --no-progress for quieter apply runs. + - Maintenance release for the CLI framework and console stack. + - No intentional CLI flag or output-contract changes. @@ -73,13 +72,15 @@ - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - + + + + true + obj/generated + + <_AotToolSymbolPackageFiles Include="@(TfmSpecificPackageFile)" Condition="$([System.String]::Copy('%(TfmSpecificPackageFile.Identity)').EndsWith('.pdb')) or $([System.String]::Copy('%(TfmSpecificPackageFile.Identity)').EndsWith('.dbg')) or $([System.String]::Copy('%(TfmSpecificPackageFile.Identity)').Contains('.dSYM/')) or $([System.String]::Copy('%(TfmSpecificPackageFile.Identity)').Contains('.dSYM\\'))" /> diff --git a/src/Seek.Cli/assets/ConsoleAppFramework.dll b/src/Seek.Cli/assets/ConsoleAppFramework.dll new file mode 100644 index 0000000..8c18c6c Binary files /dev/null and b/src/Seek.Cli/assets/ConsoleAppFramework.dll differ diff --git a/tests/Seek.Cli.Tests/CommandMetadataTests.cs b/tests/Seek.Cli.Tests/CommandMetadataTests.cs index 798e0fb..7053bc9 100644 --- a/tests/Seek.Cli.Tests/CommandMetadataTests.cs +++ b/tests/Seek.Cli.Tests/CommandMetadataTests.cs @@ -8,7 +8,7 @@ public async Task SearchCommandSummary_DescribesTheDefaultCommandAndApp(Cancella cancellationToken); await Assert.That(searchCommandContents.Contains( - "Seek is a fast filesystem search tool for files and directories by David Shnayder (@dusrdev).", + "Seek is a fast filesystem searcher made by David Shnayder (@dusrdev).", StringComparison.Ordinal)).IsTrue(); } diff --git a/tests/Seek.Cli.Tests/CommandsDeleteTests.cs b/tests/Seek.Cli.Tests/CommandsDeleteTests.cs index 482f045..80be90e 100644 --- a/tests/Seek.Cli.Tests/CommandsDeleteTests.cs +++ b/tests/Seek.Cli.Tests/CommandsDeleteTests.cs @@ -252,15 +252,16 @@ public void Dispose() { ConsoleContext.Out = output; var exitCode = await Commands.DeleteAsync( - query: query, - regex: regex, - caseSensitive: false, - hidden: false, - system: false, - files: files, - directories: directories, + new SearchParameters( + Query: query, + Regex: regex, + CaseSensitive: false, + Hidden: false, + System: false, + Files: files, + Directories: directories, + Root: root), noProgress: true, - root: root, apply: apply, cancellationToken: cancellationToken); diff --git a/tests/Seek.Cli.Tests/CommandsSearchTests.cs b/tests/Seek.Cli.Tests/CommandsSearchTests.cs index 25ba880..197d8e0 100644 --- a/tests/Seek.Cli.Tests/CommandsSearchTests.cs +++ b/tests/Seek.Cli.Tests/CommandsSearchTests.cs @@ -327,17 +327,18 @@ public void Dispose() { ConsoleContext.Out = output; var exitCode = await Commands.SearchAsync( - query, - regex, - false, - noHighlight, - absolute, - @null, - false, - false, - files, - directories, - root, + new SearchParameters( + Query: query, + Regex: regex, + CaseSensitive: false, + Hidden: false, + System: false, + Files: files, + Directories: directories, + Root: root), + plain: noHighlight, + absolute: absolute, + @null: @null, cancellationToken); return (exitCode, output.ToString());