Skip to content

MDEV-40551 Copy/Paste friendly output format for MariaDB Command Line Client - #5632

Open
KhaledR57 wants to merge 1 commit into
mainfrom
bb-main-MDEV-40551
Open

MDEV-40551 Copy/Paste friendly output format for MariaDB Command Line Client#5632
KhaledR57 wants to merge 1 commit into
mainfrom
bb-main-MDEV-40551

Conversation

@KhaledR57

Copy link
Copy Markdown
Contributor

Copy/paste friendly output was only reachable by starting the client with --silent --skip-column-names, which cannot be done from a running interactive session.

Add \S, a statement terminator which prints the result of one statement in the tab separated format without column names.

com_silent() sets output_plain, opt_silent and column_names around com_go(), then restores them, the same way com_ego() handles vertical. output_plain selects print_tab_data() ahead of the vertical and table branches, so \S gives the same output whether the session was started plainly or with --table, --vertical or --silent. --html and --xml still win, matching \G.

… Client

Copy/paste friendly output was only reachable by starting the client with
--silent --skip-column-names, which cannot be done from a running
interactive session.

Add \S, a statement terminator which prints the result of one statement in
the tab separated format without column names.

com_silent() sets output_plain, opt_silent and column_names around
com_go(), then restores them, the same way com_ego() handles vertical.
output_plain selects print_tab_data() ahead of the vertical and table
branches, so \S gives the same output whether the session was started
plainly or with --table, --vertical or --silent. --html and --xml still
win, matching \G.
@KhaledR57 KhaledR57 self-assigned this Sep 3, 2026
@KhaledR57
KhaledR57 requested a review from vuvova September 3, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant