Repository: microsoft/PowerToys
File: src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Main.cs (C#)

Code before:
                    thread.Start();
                    thread.Join();
                    return ret;
                },
            };
        }

        private List<Result> GetSuggestionFuzzyResults(Query query, List<Result> results)
        {
            foreach (var generatorData in QueryHelper.GeneratorDataList)
            {
                var matchScore = StringMatcher.FuzzySearch(query.Search, generatorData.Keyword).Score;

                if (matchScore > 0)
                {
                    results.Add(new Result
                    {
                        Title = QueryHelper.GetResultTitle(generatorData),
                        SubTitle = QueryHelper.GetResultSubtitle(generatorData),
                        IcoPath = GetIcoPath(),
                        Score = matchScore,
                        ToolTipData = new ToolTipData(QueryHelper.GetResultTitle(generatorData), QueryHelper.GetResultSubtitle(generatorData)),
                        QueryTextDisplay = generatorData.Keyword,
                        Action = c =>
                        {
                            _context.API.ChangeQuery($"{query.ActionKeyword} {generatorData.Keyword}", true);
                            return false;
                        },
                    });
                }
            }

            return results;
        }

        private Result GetErrorResult(string errorMessage)
        {
            return new Result
            {
                Title = Resources.error_title,
                SubTitle = errorMessage,
                ToolTipData = new ToolTipData(Resources.error_title, errorMessage),
                IcoPath = GetIcoPath(isWarning: true),
                Action = _ => { return true; },
            };
        }
    }
}


Review comment (suggestion):
```suggestion
                            _context.API.ChangeQuery($"{query.ActionKeyword} {generatorData.Keyword} ", true);
```

Helps the user to start typing the args immediately.

Code after:
                    thread.Start();
                    thread.Join();
                    return ret;
                },
            };
        }

        private List<Result> GetSuggestionFuzzyResults(Query query, List<Result> results)
        {
            foreach (var generatorData in QueryHelper.GeneratorDataList)
            {
                var matchScore = StringMatcher.FuzzySearch(query.Search.Trim(), generatorData.Keyword).Score;

                if (matchScore > 0)
                {
                    results.Add(new Result
                    {
                        Title = QueryHelper.GetResultTitle(generatorData),
                        SubTitle = QueryHelper.GetResultSubtitle(generatorData),
                        IcoPath = GetIcoPath(),
                        Score = matchScore,
                        ToolTipData = new ToolTipData(QueryHelper.GetResultTitle(generatorData), QueryHelper.GetResultSubtitle(generatorData)),
                        QueryTextDisplay = generatorData.Keyword + " ",
                        Action = c =>
                        {
                            _context.API.ChangeQuery($"{query.ActionKeyword} {generatorData.Keyword} ", true);
                            return false;
                        },
                    });
                }
            }

            return results;
        }

        private Result GetErrorResult(string errorMessage)
        {
            return new Result
            {
                Title = Resources.error_title,
                SubTitle = errorMessage,
                ToolTipData = new ToolTipData(Resources.error_title, errorMessage),
                IcoPath = GetIcoPath(isWarning: true),
                Action = _ => { return true; },
            };
        }
    }
}