From 4e32168c96d5655efbee1b868c22ec0a0374ea90 Mon Sep 17 00:00:00 2001 From: Brad Kollmyer Date: Fri, 10 Jul 2026 17:36:17 -0700 Subject: [PATCH] cli: T9077: document literal question mark entry and value quoting Document how to enter a literal '?' (Ctrl-V, and quoted values on rolling with the T9077 fix), the previously undocumented 'set terminal key query-help' toggle, and the need to quote values containing shell special characters such as '&'. Co-Authored-By: Claude Fable 5 --- docs/cli.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/docs/cli.md b/docs/cli.md index 0931c9d63b..07a2da3823 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -15,6 +15,41 @@ The CLI provides a built-in help system. In the CLI the `?` key may be used to display available commands. The `TAB` key can be used to auto-complete commands and will present the help system upon a conflict or unknown value. +### Typing a literal question mark + +Because `?` is the help key, a literal question mark needs special handling +when it is part of a value, such as a URL with a query string. Press +`Ctrl-V` followed by `?` to insert a literal question mark; this works on +all VyOS releases. + +On current rolling releases a `?` typed **inside a quoted string** is +inserted literally, and only triggers the help system outside of quotes: + +``` none +set firewall group remote-group EXAMPLE url 'https://example.com/list?key=abc' +``` + +On LTS and older releases the `?` key always triggers help, even inside +quotes — use `Ctrl-V` `?` there. + +```{opcmd} set terminal key query-help + +Enable or disable getting help using the question mark key. When disabled, +`?` always inserts a literal question mark. The setting is stored in the +user's `~/.bashrc` and persists across sessions. Default: enabled. +``` + +### Quoting values + +Always quote a value that contains spaces or shell special characters such +as `&`, `;`, `#` or quotes. The configuration shell is based on bash: an +unquoted `&` does not cause an error — it is interpreted as a command +separator and the value is **silently truncated** at the `&`: + +``` none +set firewall group remote-group EXAMPLE url 'https://example.com/list?key=abc&ipVersion=4' +``` + For example typing `sh` followed by the `TAB` key will complete to `show`. Pressing `TAB` a second time will display the possible sub-commands of the `show` command.