From 8deab8d9ce58b7d07622183a07924b7746f1ecc5 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Tue, 4 Oct 2022 18:47:37 +0200 Subject: [PATCH] docs/string: Document shorten return value and --quiet --- doc_src/cmds/string-shorten.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc_src/cmds/string-shorten.rst b/doc_src/cmds/string-shorten.rst index ab27ea2d2..a6a726136 100644 --- a/doc_src/cmds/string-shorten.rst +++ b/doc_src/cmds/string-shorten.rst @@ -8,7 +8,7 @@ Synopsis .. synopsis:: - string shorten [(-c | --char) CHARS] [(-m | --max) INTEGER] [(-N | --no-newline)] [(-l | --left)] + string shorten [(-c | --char) CHARS] [(-m | --max) INTEGER] [(-N | --no-newline)] [(-l | --left)] [(-q | --quiet)] [STRING ...] .. END SYNOPSIS @@ -30,8 +30,12 @@ If **-c** or **--char** is given, add *CHAR* instead of an ellipsis. This can al If **-l** or **--left** is given, remove text from the left on instead, so this prints the longest *suffix* of the string that fits. With **--no-newline**, this will take from the last line instead of the first. +If **-q** or **--quiet** is given, ``string shorten`` only runs for the return value - if anything would be shortened, it returns 0, else 1. + The default ellipsis is ``…``. If fish thinks your system is incapable because of your locale, it will use ``...`` instead. +The return value is 0 if any shortening occured, 1 otherwise. + .. END DESCRIPTION Examples