]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cli: split APPCTX_CLI_ST1_PROMPT into two distinct flags
authorWilly Tarreau <w@1wt.eu>
Mon, 28 Apr 2025 15:42:03 +0000 (17:42 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 28 Apr 2025 18:21:06 +0000 (20:21 +0200)
commitf25b4abc9bc561cb963a9eb34e8f089218002bf8
tree4d4554c5724e64bcaf898efdd4cc310d50f0ec2f
parent5ac280f2a7bc36d5c288844b920c9ee8e1d1a6eb
MINOR: cli: split APPCTX_CLI_ST1_PROMPT into two distinct flags

The CLI's "prompt" command toggles two distinct things:
  - displaying or hiding the prompt at the beginning of the line
  - single-command vs interactive mode

These are two independent concepts and the prompt mode doesn't
always cope well with tools that would like to upload data without
having to read the prompt on return. Also, the master command line
works in interactive mode by default with no prompt, which is not
consistent (and not convenient for tools). So let's start by splitting
the bit in two, and have a new APPCTX_CLI_ST1_INTER flag dedicated
to the interactive mode. For now the "prompt" command alone continues
to toggle the two at once.
include/haproxy/cli-t.h
src/cli.c