From b68acfcd5ea12de108cbb941635bb8cee46e9f2b Mon Sep 17 00:00:00 2001 From: Matthew Peveler Date: Mon, 3 Aug 2020 10:54:04 -0400 Subject: [PATCH 1/4] Add recommendation to exiting with non-zero code on missing page --- CLIENT-SPECIFICATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLIENT-SPECIFICATION.md b/CLIENT-SPECIFICATION.md index 13c00c9e4f511e..4e7f5ab9ae44ce 100644 --- a/CLIENT-SPECIFICATION.md +++ b/CLIENT-SPECIFICATION.md @@ -164,7 +164,7 @@ If a page cannot be found in _any_ platform, then it is RECOMMENDED that clients https://github.com/tldr-pages/tldr/issues/new?title=page%20request:%20{command_name} ``` -where `{command_name}` is the name of the command that was not found. +where `{command_name}` is the name of the command that was not found. It is RECOMMENDED that clients exit with a non-zero exit code in addition to showing the above message. #### If multiple versions of a page were found From a047584e6bd48c3cd0476c8a9be43a976785a0ef Mon Sep 17 00:00:00 2001 From: Matthew Peveler Date: Thu, 13 Aug 2020 12:02:34 -0400 Subject: [PATCH 2/4] Update CLIENT-SPECIFICATION.md Co-authored-by: Starbeamrainbowlabs --- CLIENT-SPECIFICATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLIENT-SPECIFICATION.md b/CLIENT-SPECIFICATION.md index 4e7f5ab9ae44ce..991b0525e4c303 100644 --- a/CLIENT-SPECIFICATION.md +++ b/CLIENT-SPECIFICATION.md @@ -164,7 +164,7 @@ If a page cannot be found in _any_ platform, then it is RECOMMENDED that clients https://github.com/tldr-pages/tldr/issues/new?title=page%20request:%20{command_name} ``` -where `{command_name}` is the name of the command that was not found. It is RECOMMENDED that clients exit with a non-zero exit code in addition to showing the above message. +where `{command_name}` is the name of the command that was not found. Clients that have control over their exit code on the command line (i.e. clients that provide a CLI) MUST exit with a non-zero exit code in addition to showing the above message. #### If multiple versions of a page were found From 9298d697bb912382b96f394b6c3695d539fe65a0 Mon Sep 17 00:00:00 2001 From: Matthew Peveler Date: Thu, 13 Aug 2020 12:06:31 -0400 Subject: [PATCH 3/4] Bump version of specification --- CLIENT-SPECIFICATION.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CLIENT-SPECIFICATION.md b/CLIENT-SPECIFICATION.md index 991b0525e4c303..73a0a189aa220b 100644 --- a/CLIENT-SPECIFICATION.md +++ b/CLIENT-SPECIFICATION.md @@ -221,6 +221,9 @@ Caching SHOULD be done according to the user's language configuration (if any), ## Changelog + - [v1.4, August 13th 2020](https://github.com/tldr-pages/tldr/blob/master/CLIENT-SPECIFICATION.md) (#4246) + - Add requirement for CLI clients to use non-zero exit code on failing to find a page. + - [v1.3, June 11th 2020](https://github.com/tldr-pages/tldr/blob/master/CLIENT-SPECIFICATION.md) (#4101) - Clarified fallback to English in the language resolution algorithm. - Update `LANG` and `LANGUAGE` environment variable to conform to the GNU spec. From 2c01f0b79f280f2daeda00c5ed24570839441120 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sun, 16 Aug 2020 16:32:31 +0100 Subject: [PATCH 4/4] client-spec: bump version at the top too --- CLIENT-SPECIFICATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLIENT-SPECIFICATION.md b/CLIENT-SPECIFICATION.md index 73a0a189aa220b..3de1dd15dd3163 100644 --- a/CLIENT-SPECIFICATION.md +++ b/CLIENT-SPECIFICATION.md @@ -1,6 +1,6 @@ # tldr-pages client specification -**Current Specification Version:** 1.3 +**Current Specification Version:** 1.4 This document contains the official specification for tldr-pages clients. It is _not_ a specification of the format of the pages themselves - only a specification of how a user should be able to interface with an official client. For a list of previous versions of the specification, see the [changelog section](#Changelog) below.