From a7f3af921fa240806eb3cc0e8bf9a2a636dfff55 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Fri, 30 Sep 2022 18:50:14 +0200 Subject: [PATCH] docs: Document type/builtin exit status Fixes #9252 --- doc_src/cmds/builtin.rst | 2 +- doc_src/cmds/type.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc_src/cmds/builtin.rst b/doc_src/cmds/builtin.rst index 48cce29ab..dfc40fd3a 100644 --- a/doc_src/cmds/builtin.rst +++ b/doc_src/cmds/builtin.rst @@ -23,7 +23,7 @@ The following options are available: Lists the names of all defined builtins. **-q** or **--query** *BUILTIN* - Tests if any of the specified builtins exist. + Tests if any of the specified builtins exist. If any exist, it returns 0, 1 otherwise. **-h** or **--help** Displays help about using this command. diff --git a/doc_src/cmds/type.rst b/doc_src/cmds/type.rst index 4fb5d263f..763e12a47 100644 --- a/doc_src/cmds/type.rst +++ b/doc_src/cmds/type.rst @@ -43,6 +43,7 @@ The following options are available: The **-q**, **-p**, **-t** and **-P** flags (and their long flag aliases) are mutually exclusive. Only one can be specified at a time. +``type`` returns 0 if at least one entry was found, 1 otherwise, and 2 for invalid options or option combinations. Example -------