mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-11-01 01:25:27 +08:00 
			
		
		
		
	Adds default command to explain feature
This commit is contained in:
		 Phil Scott
					Phil Scott
				
			
				
					committed by
					
						 Patrik Svensson
						Patrik Svensson
					
				
			
			
				
	
			
			
			 Patrik Svensson
						Patrik Svensson
					
				
			
						parent
						
							41ccc0b464
						
					
				
				
					commit
					ae96606ab7
				
			| @@ -44,9 +44,14 @@ namespace Spectre.Console.Cli | ||||
|  | ||||
|             if (settings.Commands == null || settings.Commands.Length == 0) | ||||
|             { | ||||
|                 // If there is a default command we'll want to include it in the list too. | ||||
|                 var commands = _commandModel.DefaultCommand != null | ||||
|                     ? new[] { _commandModel.DefaultCommand }.Concat(_commandModel.Commands) | ||||
|                     : _commandModel.Commands; | ||||
|  | ||||
|                 AddCommands( | ||||
|                     tree.AddNode(ParentMarkup("Commands")), | ||||
|                     _commandModel.Commands, | ||||
|                     commands, | ||||
|                     settings.Detailed ?? false); | ||||
|             } | ||||
|             else | ||||
|   | ||||
		Reference in New Issue
	
	Block a user