Repository: PowerShell/PowerShell
File: src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs (C#)

Code before:

                if (psobjs is not null)
                {
                    foreach (dynamic psobj in psobjs)
                    {
                        var name = psobj.Name as string;
                        if (!string.IsNullOrEmpty(name))
                        {
                            var tooltip = name;
                            var variable = PSObject.Base(psobj) as PSVariable;
                            if (variable != null)
                            {
                                var value = variable.Value;
                                if (value != null)
                                {
                                    tooltip = StringUtil.Format("[{0}]${1}",
                                                                ToStringCodeMethods.Type(value.GetType(),
                                                                                         dropNamespaces: true), name);
                                }
                            }
                            if (!string.IsNullOrEmpty(variable.Description))
                            {
                                tooltip += $" - {variable.Description}";
                            }

                            var completedName = !tokenAtCursorUsedBraces && !ContainsCharactersRequiringQuotes(name)
                                                    ? prefix + scopePrefix + name
                                                    : prefix + "{" + scopePrefix + name + "}";
                            AddUniqueVariable(hashedResults, results, completedName, name, tooltip);
                        }
                    }
                }
            }

            if (colon == -1 && "env".StartsWith(wordToComplete, StringComparison.OrdinalIgnoreCase))
            {
                var envVars = Environment.GetEnvironmentVariables();
                foreach (var key in envVars.Keys)
                {
                    var name = "env:" + key;
                    var completedName = !tokenAtCursorUsedBraces && !ContainsCharactersRequiringQuotes(name)
                        ? prefix + name
                        : prefix + "{" + name + "}";
                    AddUniqueVariable(hashedResults, tempResults, completedName, name, "[string]" + name);
                }

                results.AddRange(tempResults.OrderBy(item => item.ListItemText, StringComparer.OrdinalIgnoreCase));
                tempResults.Clear();
            }

            if (colon == -1)

Review comment (suggestion):
```suggestion

                            if (!string.IsNullOrEmpty(variable.Description))
                            {
                                tooltip += $" - {variable.Description}";
                            }
```

Code after:
                var psobjs = powerShellExecutionHelper.ExecuteCurrentPowerShell(out _);

                if (psobjs is not null)
                {
                    foreach (dynamic psobj in psobjs)
                    {
                        var name = psobj.Name as string;
                        if (!string.IsNullOrEmpty(name))
                        {
                            var tooltip = name;
                            var variable = PSObject.Base(psobj) as PSVariable;
                            if (variable != null)
                            {
                                var value = variable.Value;
                                if (value != null)
                                {
                                    tooltip = StringUtil.Format("[{0}]${1}",
                                                                ToStringCodeMethods.Type(value.GetType(),
                                                                                         dropNamespaces: true), name);
                                }
                            }

                            if (!string.IsNullOrEmpty(variable.Description))
                            {
                                tooltip += $" - {variable.Description}";
                            }

                            var completedName = !tokenAtCursorUsedBraces && !ContainsCharactersRequiringQuotes(name)
                                                    ? prefix + scopePrefix + name
                                                    : prefix + "{" + scopePrefix + name + "}";
                            AddUniqueVariable(hashedResults, results, completedName, name, tooltip);
                        }
                    }
                }
            }

            if (colon == -1 && "env".StartsWith(wordToComplete, StringComparison.OrdinalIgnoreCase))
            {
                var envVars = Environment.GetEnvironmentVariables();
                foreach (var key in envVars.Keys)
                {
                    var name = "env:" + key;
                    var completedName = !tokenAtCursorUsedBraces && !ContainsCharactersRequiringQuotes(name)
                        ? prefix + name
                        : prefix + "{" + name + "}";
                    AddUniqueVariable(hashedResults, tempResults, completedName, name, "[string]" + name);
                }

                results.AddRange(tempResults.OrderBy(item => item.ListItemText, StringComparer.OrdinalIgnoreCase));
                tempResults.Clear();
            }