diff --git a/CHANGELOG.md b/CHANGELOG.md index d8184706..26187d01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format mostly follows [Keep a Changelog](http://keepachangelog.com/en/1.0.0/ ### Changed - Remove EOL'd Python 3.8 (new minimum requirement is Python 3.9), add Python 3.13 testing +- Commands that reference a job by index or url (such as testing filters and modifying jobs) can now also reference by name (#846 by jamstah) ### Fixed diff --git a/lib/urlwatch/command.py b/lib/urlwatch/command.py index cdafbbd6..3296946a 100644 --- a/lib/urlwatch/command.py +++ b/lib/urlwatch/command.py @@ -117,7 +117,7 @@ def _find_job(self, query): except IndexError: return None except ValueError: - return next((job for job in self.urlwatcher.jobs if job.get_location() == query), None) + return next((job for job in self.urlwatcher.jobs if query in [job.get_location(), job.name]), None) def _get_job(self, id): job = self._find_job(id)