MDEV-40551 Copy/Paste friendly output format for MariaDB Command Line Client - #5632
Open
KhaledR57 wants to merge 1 commit into
Open
MDEV-40551 Copy/Paste friendly output format for MariaDB Command Line Client#5632KhaledR57 wants to merge 1 commit into
KhaledR57 wants to merge 1 commit into
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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()setsoutput_plain,opt_silentandcolumn_namesaroundcom_go(), then restores them, the same waycom_ego()handles vertical.output_plainselectsprint_tab_data()ahead of the vertical and table branches, so\Sgives the same output whether the session was started plainly or with--table,--verticalor--silent.--htmland--xmlstill win, matching\G.