Skip to content

[ fix ] glow wont detect config width=0 (wrap disable) in glow.yml (Debian Linux)#926

Open
kenttonino wants to merge 1 commit intocharmbracelet:masterfrom
kenttonino:fix/width-zero-in-config-not-disabling-wrap
Open

[ fix ] glow wont detect config width=0 (wrap disable) in glow.yml (Debian Linux)#926
kenttonino wants to merge 1 commit intocharmbracelet:masterfrom
kenttonino:fix/width-zero-in-config-not-disabling-wrap

Conversation

@kenttonino
Copy link
Copy Markdown

Summary

  • In Debian Linux, I can disable the word wrap glow --width=0 README.md
    • However when I set the width: 0 in glow.yml config it cannot detect disabling of word wrap when I run glow README.md. It default to 80 width.
    • If I set the width to > 0, it works fine, it can detect the width.



Changes

  • Add a condition to check if the width is set in glow.yml if the user did not explicitly set the width (e.g. glow --width=0).
    • If exist, skipped the auto-detection of terminal width and capping of width.



Test Plan

  • Set the glow.yml to width: 0.
  • Run glow README.md.
    • It should disable the wrap.

@kenttonino kenttonino requested a review from a team as a code owner April 9, 2026 12:24
@kenttonino kenttonino requested review from andreynering and meowgorithm and removed request for a team April 9, 2026 12:24
@kenttonino kenttonino changed the title [ fix ] glow wont detect config width=0 in glow.yml (Debian Linux) [ fix ] glow wont detect config width=0 (wrap disable) in glow.yml (Debian Linux) Apr 9, 2026
@kenttonino kenttonino force-pushed the fix/width-zero-in-config-not-disabling-wrap branch from 51fc4de to 7e686d7 Compare April 10, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant