diff --git a/GitUI/CommandsDialogs/FormCommandlineHelp.resx b/GitUI/CommandsDialogs/FormCommandlineHelp.resx
index fb5eac965a1..dcf8f65b1a2 100644
--- a/GitUI/CommandsDialogs/FormCommandlineHelp.resx
+++ b/GitUI/CommandsDialogs/FormCommandlineHelp.resx
@@ -118,7 +118,8 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- browse [path] [-filter=] [-commit=<selectedSha>[,<firstSha>]]
+ .
+browse [path] [-filter=] [-commit=<selectedSha>[,<firstSha>]]
about
add [filename]
addfiles [filename]
diff --git a/GitUI/GitUICommands.cs b/GitUI/GitUICommands.cs
index e645f79cac2..faabd65d55d 100644
--- a/GitUI/GitUICommands.cs
+++ b/GitUI/GitUICommands.cs
@@ -1487,6 +1487,12 @@ private bool RunCommandBasedOnArgument(IReadOnlyList args, IReadOnlyDict
return StartCloneDialog(null, args[1].Replace("github-mac://openRepo/", ""), true);
}
+ // User supplied `.` as param. So, we need to open the current working directory.
+ if (args[1] == ".")
+ {
+ return StartBrowseDialog();
+ }
+
break;
}
#pragma warning restore SA1025 // Code should not contain multiple whitespace in a row
diff --git a/IntegrationTests/UI.IntegrationTests/GitUICommands/RunCommandTests.cs b/IntegrationTests/UI.IntegrationTests/GitUICommands/RunCommandTests.cs
index c2809f600a9..c55de9503f8 100644
--- a/IntegrationTests/UI.IntegrationTests/GitUICommands/RunCommandTests.cs
+++ b/IntegrationTests/UI.IntegrationTests/GitUICommands/RunCommandTests.cs
@@ -363,5 +363,14 @@ private static void ClickButton(Form form, string buttonName)
private static void SetText(Form form, string controlName, string value)
=> form.FindDescendantOfType(control => control.Name == controlName).Text = value;
+
+ [Test]
+ public void RunCommandBasedOnArgument_dot()
+ {
+ var selected = ObjectId.Random();
+ var first = ObjectId.Random();
+ var otherIgnored = ObjectId.Random();
+ RunCommandBasedOnArgument(new string[] { "ge.exe", "." });
+ }
}
}