44using Spectre . Console ;
55using Spectre . Console . Cli ;
66using SmartImage . Rdx . Shell ;
7- using Spectre . Console . Cli . Help ;
87
98namespace SmartImage . Rdx ;
109
@@ -23,15 +22,12 @@ namespace SmartImage.Rdx;
2322public static class Program
2423{
2524
26- private static readonly Assembly s_assembly = Assembly . GetExecutingAssembly ( ) ;
27- private static readonly string s_version = s_assembly . GetName ( ) . Version . ToString ( ) ;
28-
2925 public static async Task < int > Main ( string [ ] args )
3026 {
3127 Debug . WriteLine ( AConsole . Profile . Height ) ;
3228 Debug . WriteLine ( Console . BufferHeight ) ;
3329
34- var ff = CliFormat . LoadFigletFontFromResource ( nameof ( R2 . Fg_larry3d ) , out var ms ) ;
30+ var ff = CliFormat . LoadFigletFontFromResource ( nameof ( R2 . Fg_larry3d ) , out var ms ) ;
3531
3632 // ms?.Dispose();
3733
@@ -52,24 +48,38 @@ public static async Task<int> Main(string[] args)
5248 // var env = Environment.GetEnvironmentVariables(EnvironmentVariableTarget.Process);
5349
5450 var app = new CommandApp < SearchCommand > ( ) ;
55-
51+
5652 app . Configure ( c =>
5753 {
5854 c . PropagateExceptions ( ) ;
59- var helpProvider = new HelpProvider ( c . Settings ) ;
55+ var helpProvider = new CustomHelpProvider ( c . Settings ) ;
6056 c . SetHelpProvider ( helpProvider ) ;
61-
57+
58+ /*
59+ c.SetExceptionHandler((x, i) =>
60+ {
61+ AConsole.WriteLine($"{x}");
62+ Console.ReadKey();
63+
64+ });
65+ */
66+
6267 //...
6368 } ) ;
6469
6570 try {
6671 var x = await app . RunAsync ( args ) ;
67-
72+
73+ if ( x != SearchCommand . EC_OK ) {
74+ AConsole . Confirm ( "Press any key to continue" ) ;
75+ }
76+
77+ // Console.ReadLine();
78+
6879 return x ;
6980 }
7081 catch ( Exception e ) {
7182 AConsole . WriteException ( e ) ;
72-
7383 return SearchCommand . EC_ERROR ;
7484 }
7585 }
0 commit comments