diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f8ee87..78732f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 3.4.1 (04/29/2025) + +### Bugfixes + +* Fix manpage path in `pyproject.toml` (thanks [@kbdharun](https://github.com/kbdharun)) + +### Features + +* Fallback to `common` if a platform is specified using `-p` flag, but a page doesn't exist for that platform (thanks [@kbdharun](https://github.com/kbdharun)) + ## 3.4.0 (03/28/2025) ### Breaking diff --git a/docs/man/tldr.1 b/docs/man/tldr.1 index f667679..c6a803e 100644 --- a/docs/man/tldr.1 +++ b/docs/man/tldr.1 @@ -27,9 +27,9 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "TLDR" "1" "Mar 28, 2025" "" "tldr" +.TH "TLDR" "1" "Apr 29, 2025" "" "tldr" .SH NAME -tldr \- tldr 3.4.0 +tldr \- tldr 3.4.1 .sp Python command line client for tldr @@ -59,12 +59,12 @@ Search for a specific command from a query .B \-u, \-\-update, \-\-update_cache Update the local cache of pages and exit .sp -Default: False +Default: \fBFalse\fP .TP .B \-k, \-\-clear\-cache Delete the local cache of pages and exit .sp -Default: False +Default: \fBFalse\fP .TP .B \-p, \-\-platform Possible choices: android, freebsd, linux, netbsd, openbsd, osx, sunos, windows, common @@ -74,12 +74,12 @@ Override the operating system [android, freebsd, linux, netbsd, openbsd, osx, su .B \-l, \-\-list List all available commands for operating system .sp -Default: False +Default: \fBFalse\fP .TP .B \-s, \-\-source Override the default page source .sp -Default: \(dq\X'tty: link https://raw.githubusercontent.com/tldr-pages/tldr/main/pages'\fI\%https://raw.githubusercontent.com/tldr\-pages/tldr/main/pages\fP\X'tty: link'\(dq +Default: \fB\(aqhttps://raw.githubusercontent.com/tldr\-pages/tldr/main/pages\(aq\fP .TP .B \-c, \-\-color Override color stripping @@ -87,7 +87,7 @@ Override color stripping .B \-r, \-\-render Render local markdown files .sp -Default: False +Default: \fBFalse\fP .TP .B \-L, \-\-language Override the default language @@ -95,17 +95,17 @@ Override the default language .B \-m, \-\-markdown Just print the plain page file. .sp -Default: False +Default: \fBFalse\fP .TP .B \-\-short\-options Display shortform options over longform .sp -Default: False +Default: \fBFalse\fP .TP .B \-\-long\-options Display longform options over shortform .sp -Default: False +Default: \fBFalse\fP .TP .B \-\-print\-completion Possible choices: bash, zsh, tcsh diff --git a/tldr.py b/tldr.py index 220ef5f..d11b237 100755 --- a/tldr.py +++ b/tldr.py @@ -18,7 +18,7 @@ import shtab import shutil -__version__ = "3.4.0" +__version__ = "3.4.1" __client_specification__ = "2.3" REQUEST_HEADERS = {'User-Agent': 'tldr-python-client'} @@ -251,6 +251,10 @@ def get_page_for_every_platform( """Gives a list of tuples result-platform ordered by priority.""" if platforms is None: platforms = get_platform_list() + else: + # When platform is explicitly specified, ensure 'common' is included as fallback + if 'common' not in platforms and len(platforms) > 0: + platforms = platforms + ['common'] if languages is None: languages = get_language_list() # only use cache