mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-11-04 18:40:50 +08:00 
			
		
		
		
	CommandOptions now has an IsHidden property that, when set to true, will cause the option to be hidden from the following cases: - Help text using `-h|--help` - Xml representations generated with the `cli xml` command - Diagnostics displayed with the `cli explain` command Hidden options can still be outputted with `cli explain` using the `--hidden` option that is also used to display hidden commands. Fixes #631
		
			
				
	
	
		
			13 lines
		
	
	
		
			291 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			291 B
		
	
	
	
		
			C#
		
	
	
	
	
	
using Spectre.Console.Cli;
 | 
						|
 | 
						|
namespace Spectre.Console.Tests.Data
 | 
						|
{
 | 
						|
    public sealed class HiddenOptionsCommand : Command<HiddenOptionSettings>
 | 
						|
    {
 | 
						|
        public override int Execute(CommandContext context, HiddenOptionSettings settings)
 | 
						|
        {
 | 
						|
            return 0;
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |