1
0
Fork 0

Add --help

This commit is contained in:
Starbeamrainbowlabs 2017-07-21 20:22:33 +01:00
parent 7df3c44a11
commit c8985502ae
1 changed files with 16 additions and 0 deletions

View File

@ -31,9 +31,25 @@ namespace GalleryShare
case "directory":
directory = args[++i];
break;
case "h":
case "help":
Console.WriteLine("GalleryShare");
Console.WriteLine("by Starbeamrainbowlabs, find out more at https://github.com/sbrl/GalleryShare");
Console.WriteLine();
Console.WriteLine("Usage: ");
Console.WriteLine(" ./GalleryShare.exe [options]");
Console.WriteLine();
Console.WriteLine("Options: ");
Console.WriteLine(" -h --help Show this message");
Console.WriteLine(" -d --directory {directory_path} Specify the directory to serve files from. Defaults tot he current directory.");
Console.WriteLine(" -p --port {port_number} Specify the port to listen on. Default: 3333.");
Console.WriteLine();
return 0;
default:
Console.Error.WriteLine("Error: Unknown argument '{0}'.", args[i]);
Console.Error.WriteLine("Try ./GalleryShare --help to learn how to use GalleryShare.");
return 1;
}
}