From b93e52079bc8d9b2ac1cc2f7c4ec30ccd6241f12 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Wed, 26 Jun 2024 21:53:51 -0500 Subject: [PATCH] Document `commandine --showing-suggestion` --- doc_src/cmds/commandline.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc_src/cmds/commandline.rst b/doc_src/cmds/commandline.rst index cc727315f..6d7b5ef69 100644 --- a/doc_src/cmds/commandline.rst +++ b/doc_src/cmds/commandline.rst @@ -113,6 +113,10 @@ The following options output metadata about the commandline state: If it is, it would be executed when the ``execute`` bind function is called. If the commandline is incomplete, return 2, if erroneus, return 1. +**--showing-suggestion** + Evaluates to true (i.e. returns 0) when the shell is currently showing an automatic history completion/suggestion, available to be consumed via one of the `forward-` bindings. + For example, can be used to determine if moving the cursor to the right when already at the end of the line would have no effect or if it would cause a completion to be accepted (note that `forward-char-passive` does this automatically). + Example -------