Bug Description
I would like to use the current terminal width to right justify some information in the statusLine command.
However, $COLUMNS is not set, and tput cols always ruturns 80 when run inside Claude Code.
Can we have the current terminal width made available to that command?
Updated request, after more experience:
It appears that the statusLine command output does not have availble the entire width of the terminal.
1- There are ~2 spaces on the left and right for padding.
2- When Claude Code shows messages like "Approaching limit", this takes up columns on the right, reducing significantly the width that statusLine command has available.
This should really be a feature request (not a bug), asking for the statusLine JSON to include the entire width currently available to the lines(s) output.
If there may be situations where different lines have different widths available, please include that information as well.
Note: Thanks! and I love the statusLine command feature!
In case it's not obvious, I'm talking about this in ~/.claude/settings.json:
"statusLine": {
"type": "command",
"command": "~/bin/claudecode-statusline"
}
Environment Info
- Platform: linux
- Terminal: gnome-terminal
- Version: 1.0.72
- Feedback ID: 9bb0af8a-2729-4a68-8de7-e755679f1036
Bug Description
I would like to use the current terminal width to right justify some information in the
statusLinecommand.However,
$COLUMNSis not set, andtput colsalways ruturns 80 when run inside Claude Code.Can we have the current terminal width made available to that command?
Updated request, after more experience:
It appears that the statusLine command output does not have availble the entire width of the terminal.
1- There are ~2 spaces on the left and right for padding.
2- When Claude Code shows messages like "Approaching limit", this takes up columns on the right, reducing significantly the width that statusLine command has available.
This should really be a feature request (not a bug), asking for the statusLine JSON to include the entire width currently available to the lines(s) output.
If there may be situations where different lines have different widths available, please include that information as well.
Note: Thanks! and I love the statusLine command feature!
In case it's not obvious, I'm talking about this in
~/.claude/settings.json:Environment Info