Skip to content

Commit

Permalink
flux-resource: do not use + suffix with +: prefix in formats
Browse files Browse the repository at this point in the history
Problem: The "show truncation" format string suffix character (`+`)
is effectively ignored when the "expandable field" sentinel (`+:`) is
used because the field never will be truncaated. However, some format
strings in `flux-resource.py` use these together, potentially causing
confusion.

Remove the `+` suffix on fields using `+:` in the builtin flux-resource
format strings.
  • Loading branch information
grondo committed Feb 14, 2025
1 parent e1c3af2 commit 5e8c975
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/flux-resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class FluxResourceConfig(UtilConfig):
"description": "Long flux-resource status format string",
"format": (
"{state:>12} {color_up}{up:>2}{color_off} "
"{nnodes:>6} +:{reason:<30.30+} {nodelist}"
"{nnodes:>6} +:{reason:<30.30} {nodelist}"
),
},
}
Expand All @@ -54,7 +54,7 @@ class FluxResourceConfig(UtilConfig):
"description": "Long flux-resource drain format string",
"format": (
"{timestamp!d:%b%d %R::<12} {state:<8.8} {ranks:<8.8+} "
"+:{reason:<30.30+} {nodelist}"
"+:{reason:<30.30} {nodelist}"
),
},
"default": {
Expand Down

0 comments on commit 5e8c975

Please sign in to comment.