diff --git a/PSReadLine/Completion.cs b/PSReadLine/Completion.cs index 6b3bb89b8..d1b3399eb 100644 --- a/PSReadLine/Completion.cs +++ b/PSReadLine/Completion.cs @@ -298,31 +298,6 @@ private CommandCompletion GetCompletions() var length = _tabCompletions.ReplacementLength; if (start < 0 || start > _singleton._buffer.Length) return null; if (length < 0 || length > (_singleton._buffer.Length - start)) return null; - - if (_tabCompletions.CompletionMatches.Count > 1) - { - // Filter out apparent duplicates -- the 'ListItemText' is exactly the same. - var hashSet = new HashSet(); - var matches = _tabCompletions.CompletionMatches; - List indices = null; - - for (int i = 0; i < matches.Count; i++) - { - if (!hashSet.Add(matches[i].ListItemText)) - { - indices ??= new List(); - indices.Add(i); - } - } - - if (indices is not null) - { - for (int i = indices.Count - 1; i >= 0; i--) - { - matches.RemoveAt(indices[i]); - } - } - } } catch (Exception) {