mirror of
https://gitlab.com/sbrl/GalleryShare.git
synced 2018-06-12 22:45:16 +00:00
Add --help
This commit is contained in:
parent
7df3c44a11
commit
c8985502ae
1 changed files with 16 additions and 0 deletions
|
@ -32,8 +32,24 @@ namespace GalleryShare
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue