mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Split filesystem and image list options.
This commit is contained in:
@@ -46,7 +46,7 @@ namespace DiscImageChef.Commands.Filesystem
|
||||
internal class ListOptionsCommand : Command
|
||||
{
|
||||
public ListOptionsCommand() : base("options",
|
||||
"Lists all options supported by read-only filesystems and writable media images.") =>
|
||||
"Lists all options supported by read-only filesystems.") =>
|
||||
Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke)));
|
||||
|
||||
public static int Invoke(bool debug, bool verbose)
|
||||
@@ -84,29 +84,6 @@ namespace DiscImageChef.Commands.Filesystem
|
||||
DicConsole.WriteLine();
|
||||
}
|
||||
|
||||
DicConsole.WriteLine();
|
||||
|
||||
DicConsole.WriteLine("Read/Write media images options:");
|
||||
|
||||
foreach(KeyValuePair<string, IWritableImage> kvp in plugins.WritableImages)
|
||||
{
|
||||
List<(string name, Type type, string description, object @default)> options =
|
||||
kvp.Value.SupportedOptions.ToList();
|
||||
|
||||
if(options.Count == 0)
|
||||
continue;
|
||||
|
||||
DicConsole.WriteLine("\tOptions for {0}:", kvp.Value.Name);
|
||||
DicConsole.WriteLine("\t\t{0,-20} {1,-10} {2,-12} {3,-8}", "Name", "Type", "Default", "Description");
|
||||
|
||||
foreach((string name, Type type, string description, object @default) option in
|
||||
options.OrderBy(t => t.name))
|
||||
DicConsole.WriteLine("\t\t{0,-20} {1,-10} {2,-12} {3,-8}", option.name, TypeToString(option.type),
|
||||
option.@default, option.description);
|
||||
|
||||
DicConsole.WriteLine();
|
||||
}
|
||||
|
||||
return(int)ErrorNumber.NoError;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user