mercurial/commands.py
changeset 47072 820fe29d0fd8
parent 47055 d55b71393907
child 47088 3e381eb557f3
--- a/mercurial/commands.py	Thu Apr 15 11:46:31 2021 +0200
+++ b/mercurial/commands.py	Thu Apr 15 11:48:29 2021 +0200
@@ -5126,15 +5126,9 @@
     """
 
     opts = pycompat.byteskwargs(opts)
+
+    pathitems = urlutil.list_paths(ui, search)
     ui.pager(b'paths')
-    if search:
-        pathitems = [
-            (name, path)
-            for name, path in pycompat.iteritems(ui.paths)
-            if name == search
-        ]
-    else:
-        pathitems = sorted(pycompat.iteritems(ui.paths))
 
     fm = ui.formatter(b'paths', opts)
     if fm.isplain():