Word Wrap in the CLI

Gaw

New member
When running scripts, frequently lines of output are longer than my window. This causes the window to move and cut off the beginning of subsequent lines. Is there any way to enforce word wrapping in the CLI?
 

VladYvhuce

Member
I've noticed this need for word wrap involving testudinal teachings. Is there something I should look for in Preferences to maybe make it so mafia isn't constantly displaying this info after every fight?
 

fronobulax

Developer
Staff member
I'm not aware of any easy way to make the gCLI wrap lines. There probably is a way but it probably involves Java Swing and some refactoring. Maybe someone smarter than me has some thoughts.

I chose to respond because less verbose logging of testudinal teachings could be a separate Feature request.
 

VladYvhuce

Member
For now, I'm just wondering if perhaps I should disable logging of whatever the logging is that is displaying the info. And wondering which logging setting that is. At the moment, I'm in HC grey goo and don't have the skill HC permed, so this info is not being displayed for me currently. I'm not sure which of these to uncheck: logging preferences.
 

MCroft

Developer
Staff member
What I'd really like, but haven't even thought about coding, is a separate log level for gCLI and Session Logs.

There is so much I don't care about that goes to the gCLI, but which would be a highly useful if something went wrong.

I guess that sort of presumes there's something like log4J style log levels, too...
 

fronobulax

Developer
Staff member
Previous requests have focused on things that only go to the gCLI. Their absence in the session logs makes after the fact analysis difficult. The conversation seems to cease when people realize the mirror command will capture the gCLI content to a file. And then we go down a rabbit hole because the gCLI "interprets" HTML but the session and mirror logs just treat it as text.

I want an after the session file that is as verbose as it can be. I can then accept a less verbose gCLI (and tail -f the session log if I get warm fuzzy feelings from seeing things scroll by). So a variable logging level probably needs a guarantee that everything that goes to the gCLI gets into the log. When that happens then variable display levels makes sense. That will break the utility of mirror but I think that would be acceptable if the session log were unconditionally verbose.

I quickly checked the code and I'm not seeing a quick fix for the gCLI wrapping/scrolling.

I'm also curious about which testudinal teachings are a concern.
 

heeheehee

Developer
Staff member
Regarding the particular request in this thread:

I looked into this once upon a time, and thought it would be as simple as just adding some word-wrap:break-word; CSS. It was not so -- the Swing elements in question implement a very, very limited subset of CSS.

The next best option I could find was to show a horizontal scrollbar, which did work, but I didn't spend any time/effort to hide it when no such breaking text was present.
 

MCroft

Developer
Staff member
yeah, the Swing element is the issue.

Testudinal Teachings is an enormous string to encode an array with no breaks. The more familiars you have, the more it gets ridiculous. QT makes it stand out as a problem because familiars last 11 rounds, but Autoscend or other familiar swapping scripts can do the same. The Swing element just scrolls the text in the viewport if it overflows, and leaves it with the assumption that you really want to see the rightmost character and not the many, many short charactered lines at the left margin.

Maximizer prefs also frequently cause this, but they often have spaces.

testudinalTeachings=278\:1|171\:0|214\:5|274\:3|267\:2|168\:3|275\:3|59\:2|279\:4|173\:0|89\:1|102\:1|265\:4|261\:2|211\:2|192\:1|266\:3|183\:4|188\:5|209\:4|193\:1
 

MCroft

Developer
Staff member
Previous requests have focused on things that only go to the gCLI. Their absence in the session logs makes after the fact analysis difficult. The conversation seems to cease when people realize the mirror command will capture the gCLI content to a file. And then we go down a rabbit hole because the gCLI "interprets" HTML but the session and mirror logs just treat it as text.

I want an after the session file that is as verbose as it can be. I can then accept a less verbose gCLI (and tail -f the session log if I get warm fuzzy feelings from seeing things scroll by). So a variable logging level probably needs a guarantee that everything that goes to the gCLI gets into the log. When that happens then variable display levels makes sense. That will break the utility of mirror but I think that would be acceptable if the session log were unconditionally verbose.

I quickly checked the code and I'm not seeing a quick fix for the gCLI wrapping/scrolling.
We'd definitely want to log all gCLI input and output.

If we had log levels ala Log4J, it would totally break all existing log parsing, but it would be more friendly to more tools. Session logs could be unconditionally verbose, with gCLI logging being by level.

It's a big project, since you have to assign a log level to every logging message we have. We might also decide to get rid of the debug/session log difference. but unclear if that's needed in the verbose session log model.

We could also create a "things scrolling by too fast to read" pane for those who want a fuzzy feeling.

I've got some shelved code for making a context menu in the gCLI pane, btw. It lets you do things like "select an item you've just received and look it up in the wiki" or "select a weapon you've just checked Inventory for and equip it". If we make the gCLI pane less of a gCLI/Log window multi-purpose window, that makes more sense.
 

MCroft

Developer
Staff member
yeah, the Swing element is the issue.

Testudinal Teachings is an enormous string to encode an array with no breaks. The more familiars you have, the more it gets ridiculous. QT makes it stand out as a problem because familiars last 11 rounds, but Autoscend or other familiar swapping scripts can do the same. The Swing element just scrolls the text in the viewport if it overflows, and leaves it with the assumption that you really want to see the rightmost character and not the many, many short charactered lines at the left margin.

Maximizer prefs also frequently cause this, but they often have spaces.

testudinalTeachings=278\:1|171\:0|214\:5|274\:3|267\:2|168\:3|275\:3|59\:2|279\:4|173\:0|89\:1|102\:1|265\:4|261\:2|211\:2|192\:1|266\:3|183\:4|188\:5|209\:4|193\:1
To follow up on this, last June @Rinn added logPreferenceChangeFilter to filter out changes that drive you spare.

My current setting:
Rich (BB code):
./settings/GLOBAL_prefs.txt:logPreferenceChangeFilter=maximizerMRUList,testudinalTeachings,auto_maximize_current
 
Top