@@ -33,7 +33,7 @@ public List<Result> Query(Query query)
3333 string cmd = query.Search;
3434 if (string.IsNullOrEmpty(cmd))
3535 {
36- return ResultsFromlHistory ();
36+ return ResultsFromHistory ();
3737 }
3838 else
3939 {
@@ -55,8 +55,8 @@ public List<Result> Query(Query query)
5555 else if (Directory.Exists(Path.GetDirectoryName(excmd) ?? string.Empty))
5656 {
5757 basedir = Path.GetDirectoryName(excmd);
58- var dirn = Path.GetDirectoryName(cmd);
59- dir = (dirn .EndsWith("/") || dirn .EndsWith(@"\")) ? dirn : cmd.Substring(0, dirn .Length + 1);
58+ var dirName = Path.GetDirectoryName(cmd);
59+ dir = (dirName .EndsWith("/") || dirName .EndsWith(@"\")) ? dirName : cmd.Substring(0, dirName .Length + 1);
6060 }
6161
6262 if (basedir != null)
@@ -158,7 +158,7 @@ private Result GetCurrentCmd(string cmd)
158158 return result;
159159 }
160160
161- private List<Result> ResultsFromlHistory ()
161+ private List<Result> ResultsFromHistory ()
162162 {
163163 IEnumerable<Result> history = _settings.CommandHistory.OrderByDescending(o => o.Value)
164164 .Select(m => new Result
@@ -204,7 +204,7 @@ private ProcessStartInfo PrepareProcessStartInfo(string command, bool runAsAdmin
204204 info.Arguments = $"{(_settings.LeaveShellOpen ? "/k" : "/c")} {command}";
205205
206206 //// Use info.Arguments instead of info.ArgumentList to enable users better control over the arguments they are writing.
207- //// Previous code using ArgumentList, commands needed to be seperated correctly:
207+ //// Previous code using ArgumentList, commands needed to be separated correctly:
208208 //// Incorrect:
209209 // info.ArgumentList.Add(_settings.LeaveShellOpen ? "/k" : "/c");
210210 // info.ArgumentList.Add(command); //<== info.ArgumentList.Add("mkdir \"c:\\test new\"");
@@ -377,9 +377,9 @@ public string GetTranslatedPluginDescription()
377377
378378 public List<Result> LoadContextMenus(Result selectedResult)
379379 {
380- var resultlist = new List<Result>
380+ var results = new List<Result>
381381 {
382- new Result
382+ new()
383383 {
384384 Title = context.API.GetTranslation("flowlauncher_plugin_cmd_run_as_different_user"),
385385 AsyncAction = async c =>
@@ -390,7 +390,7 @@ public List<Result> LoadContextMenus(Result selectedResult)
390390 IcoPath = "Images/user.png",
391391 Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe7ee")
392392 },
393- new Result
393+ new()
394394 {
395395 Title = context.API.GetTranslation("flowlauncher_plugin_cmd_run_as_administrator"),
396396 Action = c =>
@@ -401,7 +401,7 @@ public List<Result> LoadContextMenus(Result selectedResult)
401401 IcoPath = "Images/admin.png",
402402 Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe7ef")
403403 },
404- new Result
404+ new()
405405 {
406406 Title = context.API.GetTranslation("flowlauncher_plugin_cmd_copy"),
407407 Action = c =>
@@ -414,7 +414,7 @@ public List<Result> LoadContextMenus(Result selectedResult)
414414 }
415415 };
416416
417- return resultlist ;
417+ return results ;
418418 }
419419 }
420420}
0 commit comments