Juan Hernandez has submitted this change and it was merged.
Change subject: cli: Don't break long values
......................................................................
cli: Don't break long values
Currently when the value of a field is very long, we try to break it so
that it will take several lines. For example:
[RHEVM shell (connected)]# show something
id : ee34f1fb-308d-494f-a084-f58ec5b35b87
very-long-field : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxx
But the actual result isn't correctlly aligned due to an error in the
way we format the columns. In addition this formatting isn't useful for
users that want to copy and paste the text, as the copied text will
include spaces that the user will have to manually remove. To avoid the
issue alltogheter this patch changes the CLI so that it won't try to
break the lines. The result will be like this:
[RHEVM shell (connected)]# show something
id : ee34f1fb-308d-494f-a084-f58ec5b35b87
very-long-field : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxx
This patch also changes the default options of the "less" pager so that
it won't break long lines.
Change-Id: I8b8b7d1abcaa40a16c3be9fc26a8591b061cd103
Bug-Url:
https://bugzilla.redhat.com/1077806
Signed-off-by: Juan Hernandez <juan.hernandez(a)redhat.com>
---
M src/cli/platform/posix/util.py
M src/ovirtcli/format/text.py
2 files changed, 5 insertions(+), 17 deletions(-)
Approvals:
Juan Hernandez: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/27845
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8b8b7d1abcaa40a16c3be9fc26a8591b061cd103
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine-cli
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Michael Pasternak <mishka8520(a)yahoo.com>
Gerrit-Reviewer: Ravi Nori <rnori(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org