File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,12 @@ public static class CommandProcessor
9
9
10
10
public static void Process ( List < string > args )
11
11
{
12
+ if ( File . Exists ( args [ 0 ] ) ) {
13
+ WindowHelper . SetWindowMode ( WindowMode . Hidden ) ;
14
+ ProcessShellInput ( args [ 0 ] ) ;
15
+ return ;
16
+ }
17
+
12
18
if ( args [ 0 ] . AsFlag ( ) == 'h' ) {
13
19
Console . WriteLine ( """
14
20
Compress a file:
@@ -44,6 +50,16 @@ public static char AsFlag(this string input)
44
50
return input [ input . LastIndexOf ( '-' ) + 1 ] ;
45
51
}
46
52
53
+ public static void ProcessShellInput ( string input )
54
+ {
55
+ if ( input . EndsWith ( ".zs" ) ) {
56
+ Decompress ( input , new ( ) ) ;
57
+ }
58
+ else {
59
+ Compress ( input , new ( ) ) ;
60
+ }
61
+ }
62
+
47
63
public static void Compress ( string input , Dictionary < char , string > flags )
48
64
{
49
65
flags . TryGetValue ( 'o' , out string ? output ) ;
You can’t perform that action at this time.
0 commit comments