As we know process names get truncated with ansi o...
# help
j
As we know process names get truncated with ansi output. I know I can get full names if I use
-ansi-log false
but I do want the ansi output to have the latest colored output. I saw in this issue @Phil Ewels was suggesting something with full names as in the pic. Was this implemented? Can I get something like that with ansi logs and full process name or at least longer? As it is, it's still very challenging to read
p
I implemented this issue already
The truncation thing was that before, it took the start of the process name, which was always
NFCORE...
so every process was the same
I rewrote it so that it took the start and end, which is hopefully more unique and useful
You can see this in your screenshot
The ANSI output responds to terminal width after my change too, so if you make your terminal wider then the process names will have more space and you'll see more of their names
j
yes, thanks. I was asking more on how to get the full name instead of truncating it. I see in the source code, the width comes from the terminal: https://github.com/nextflow-io/nextflow/blob/726bf4841782fe51e7c85a42affd7b3cb602c[…]/nextflow/src/main/groovy/nextflow/trace/AnsiLogObserver.groovy
Copy code
cols = TerminalFactory.get().getWidth()
p
if you used the full name, the line would wrap over to the next line and the display would get all messed up
j
I'm using a pseudo-terminal in slurm to get ansi output. That might be the reason that defaults to a short withd
p
ahh, ok
j
llms suggest to add this to increase the width:
Copy code
export NXF_JVM_ARGS="-Djline.terminal.width=200 -Djline.terminal.height=60"
p
Yes, it defaults to 80 chars, which is quite conservative
I've never heard of
-Djline.terminal.width
, no idea if that works or not 🤷🏻‍♂️
j
Yes, default 80 is too short.I will try this. Will loop back if it works
p
We could add a new environment variable to manually override this width
➕ 1
j
That would be nice
p
in
rich-click
I do this already, using
TERMINAL_WIDTH
😮 1
Not sure if that's a standard that I got from somewhere, or just something I made up 🤔
I also intended to make Nextflow respect the
NO_COLOR
environment variable, but never got around to that
j
The
export NXF_JVM_ARGS="-Djline.terminal.width=200"
didnt work. The idea was to make JLine to read that, but it doesnt.
An ENV variable to override terminal width would be nice
p
Tested locally and it seems to work well 👍🏻
j
Awesome! 🙌 🔥
That was fast!
p
I've been feeling guilty about never getting around to implementing
NO_COLOR
for a while, so this was a good kick to make me sit down and do it 😉
j
Thank you. It's also a good PR if we want to increase the 80 default width. TIL that default terminal sizes 80x24 come from the IBM punched cards 😄 https://stackoverflow.com/questions/4651012/why-is-the-default-terminal-width-80-characters
😅 1
p
Hah, very cool!
The PR was merged, so these env vars should be available from the next edge release onwards.. (first stable 25.10.x)
❤️ 1