Skip to content

Commit

Permalink
Verbiage fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardog committed May 28, 2024
1 parent 3e00c6b commit 87226a3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/gsudo/AppSettings/PathPrecedenceSetting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal class PathPrecedenceSetting : RegistrySetting<bool>
{
public PathPrecedenceSetting():
base("PathPrecedence", false, bool.Parse, RegistrySettingScope.GlobalOnly,
description: "Prioritize gsudo over Microsoft Sudo in the PATH environment variable.")
description: "Prioritize gsudo over Microsoft Sudo in the PATH environment variable")
{

}
Expand Down
12 changes: 6 additions & 6 deletions src/gsudo/AppSettings/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Settings
= new RegistrySetting<CacheMode>(nameof(CacheMode), CredentialsCache.CacheMode.Explicit,
deserializer: ExtensionMethods.ParseEnum< CacheMode>,
scope: RegistrySettingScope.GlobalOnly,
description: "Defines how gsudo credentials cache works: Auto, Explicit (Manual), Disabled" );
description: "Defines how gsudo credentials cache works: Auto, Explicit (default), Disabled" );

public static RegistrySetting<TimeSpan> CacheDuration { get; }
= new RegistrySetting<TimeSpan>(nameof(CacheDuration),
Expand All @@ -33,14 +33,14 @@ class Settings
= new RegistrySetting<string>(nameof(PipedPrompt),
defaultValue: DefaultAsciiPrompt,
deserializer: (s) => s,
description: "Prompt to be used when gsudo uses piped mode."
description: "CMD Prompt to be used when gsudo uses piped mode"
);

public static RegistrySetting<string> Prompt { get; }
= new RegistrySetting<string>(nameof(Prompt),
defaultValue: GetPromptDefaultValue,
deserializer: (s) => s,
description: "Prompt to be used when gsudo uses standard mode."
description: "CMD Prompt to be used when gsudo uses standard mode"
);

public static RegistrySetting<LogLevel> LogLevel { get; }
Expand All @@ -54,7 +54,7 @@ class Settings
= new RegistrySetting<bool>(nameof(ForcePipedConsole),
defaultValue: false,
deserializer: bool.Parse,
description: "Forces gsudo to use legacy piped mode. Not recommended."
description: "Forces gsudo to use legacy piped mode. Not recommended"
);

public static RegistrySetting<bool> ForceAttachedConsole { get; }
Expand Down Expand Up @@ -113,14 +113,14 @@ class Settings
defaultValue: false,
deserializer: bool.Parse,
scope: RegistrySettingScope.Any,
description: "Always elevate in new window. Same as --new");
description: "Always elevate in new window. (Equivalent to --new)");

public static RegistrySetting<CloseBehaviour> NewWindow_CloseBehaviour { get; } =
new RegistrySetting<CloseBehaviour>(nameof(NewWindow_CloseBehaviour),
defaultValue: CloseBehaviour.OsDefault,
deserializer: ExtensionMethods.ParseEnum<CloseBehaviour>,
scope: RegistrySettingScope.Any,
description: "When elevating in new window, let the window auto-close (OsDefault), KeepShellOpen or PressKeyToClose"
description: "When elevating in a new window, defines what happens when the process ends: OsDefault (let the window auto-close), KeepShellOpen or PressKeyToClose"
);

public static RegistrySetting<bool> PathOverrideSetting = new PathPrecedenceSetting();
Expand Down
5 changes: 3 additions & 2 deletions src/gsudo/Commands/ConfigCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@ public Task<int> Execute()

if (key == null)
{
Console.ForegroundColor = ConsoleColor. Yellow;
// print all configs Descriptions
foreach (var k in Settings.AllKeys)
{
Console.ForegroundColor = ConsoleColor.Yellow;
if (Settings.LogLevel <= LogLevel.Info)
{
Console.WriteLine($"# {k.Value.Name}: {k.Value.Description}");
}
Console.ResetColor();
}
Console.WriteLine();
Console.ResetColor();

// print all config values
foreach (var k in Settings.AllKeys)
Expand Down

0 comments on commit 87226a3

Please sign in to comment.