-
Notifications
You must be signed in to change notification settings - Fork 0
feat: help TUI viewer, markdown rendering, rename ExampleApp to greet #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6ab8f35
feat: help TUI viewer, markdown rendering, rename ExampleApp to greet
tig 4ab71d8
Fix terminal encoding for ANSI rendering and add multiple help topics
tig f353898
Add default command support, help link navigation, and fix positional…
tig 54fb655
Port clet's BrowseBar with back/forward nav and syntax highlighting
tig dd6d7d7
Add visual help browser tests and greet example execution tests
tig 0315803
Escape markdown table cells in MetadataHelpProvider
tig ddd82e3
fix: use explicit type in collection expression for ReSharper compliance
tig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rminal.Gui.Cli.ExampleApp/GreetCommand.cs → examples/greet/GreetCommand.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...erminal.Gui.Cli.ExampleApp/InfoCommand.cs → examples/greet/InfoCommand.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...es/Terminal.Gui.Cli.ExampleApp/Program.cs → examples/greet/Program.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # greet | ||
|
|
||
| A sample CLI app built with `Terminal.Gui.Cli` that generates greetings. | ||
|
|
||
| ## Usage | ||
|
|
||
| ```bash | ||
| # Launch the TUI greeting prompt | ||
| greet greet | ||
|
|
||
| # Provide a name directly (headless) | ||
| greet greet --initial "Alice" | ||
|
|
||
| # Formal greeting style | ||
| greet greet --initial "Bob" --formal | ||
|
|
||
| # JSON envelope output | ||
| greet greet --initial "World" --json | ||
|
|
||
| # Show help in the TUI markdown viewer | ||
| greet help | ||
|
|
||
| # Render help as ANSI markdown to stdout | ||
| greet help --cat | ||
|
|
||
| # Show root help (ANSI markdown to stdout) | ||
| greet --help | ||
|
|
||
| # Show version | ||
| greet --version | ||
| ``` | ||
|
|
||
| ## Commands | ||
|
|
||
| | Command | Description | | ||
| |---------|-------------| | ||
| | `greet` | Prompt for a name and return a greeting. | | ||
| | `info` | Display application information. | | ||
| | `help` | Show command help in a TUI markdown viewer. | | ||
|
|
||
| ## Building | ||
|
|
||
| ```bash | ||
| dotnet build examples/Terminal.Gui.Cli.Greet/Terminal.Gui.Cli.Greet.csproj | ||
| ``` | ||
|
|
||
| ## Running | ||
|
|
||
| ```bash | ||
| dotnet run --project examples/Terminal.Gui.Cli.Greet -- greet --initial "World" | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
tests/Terminal.Gui.Cli.IntegrationTests/AssemblyAttributes.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| using System.Runtime.CompilerServices; | ||
| using Xunit; | ||
|
|
||
| [assembly: CollectionBehavior (DisableTestParallelization = true)] | ||
|
|
||
| namespace Terminal.Gui.Cli.IntegrationTests; | ||
|
|
||
| internal static class TestSetup | ||
| { | ||
| [ModuleInitializer] | ||
| internal static void Init () | ||
| { | ||
| Environment.SetEnvironmentVariable ("DisableRealDriverIO", "1"); | ||
| Console.SetIn (TextReader.Null); | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.