1
0
Fork 0
mirror of https://gitlab.com/sbrl/GalleryShare.git synced 2018-06-12 22:45:16 +00:00

Add --help

This commit is contained in:
Starbeamrainbowlabs 2017-07-21 20:22:33 +01:00
parent 7df3c44a11
commit c8985502ae

View file

@ -32,8 +32,24 @@ namespace GalleryShare
directory = args[++i]; directory = args[++i];
break; 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: default:
Console.Error.WriteLine("Error: Unknown argument '{0}'.", args[i]); Console.Error.WriteLine("Error: Unknown argument '{0}'.", args[i]);
Console.Error.WriteLine("Try ./GalleryShare --help to learn how to use GalleryShare.");
return 1; return 1;
} }
} }