diff --git a/beetsplug/smartplaylist.py b/beetsplug/smartplaylist.py index ff5e25612d..0b1f6fcc04 100644 --- a/beetsplug/smartplaylist.py +++ b/beetsplug/smartplaylist.py @@ -152,8 +152,9 @@ def update_cmd(self, lib: Library, opts: Any, args: list[str]) -> None: } if not playlists: unmatched = [name for name, _, _ in self._unmatched_playlists] + unmatched.sort() raise ui.UserError( - f"No playlist matching any of {unmatched} found" + f"No playlist matching any of {' '.join(unmatched)} found" ) self._matched_playlists = playlists diff --git a/docs/changelog.rst b/docs/changelog.rst index 6cd8d7623e..48ea68112b 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -35,6 +35,11 @@ New features 2. Semicolon followed by a space 3. Comma followed by a space 4. Slash wrapped by spaces +- :doc:`plugins/smartplaylist`: The list of available playlists shown when an + unknown playlist name is passed as an argument is now sorted alphabetically + and printed as a space-delimited list instead of the default Python dict + representation. This makes it easier to copy and paste multiple playlists for + further use in the shell. .. Bug fixes