torvalds

HunspellColorize

Wrapper around 'less' to colorize spelling mistakes using Hunspell

by torvalds

C

C95.4%
Makefile4.6%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
42
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · 3 in progress · Last activity 10mo ago
See all on GitHub →
Kolgrim33

Calls on initialization to respect the user's terminal locale. Handles multi-byte character sequences and buffer boundary split recovery using . Uses standard wide-character functions (, ) to accurately detect word boundaries across UTF-8 text without mangling non-ASCII characters.

Kolgrim33 · 2mo ago
p1k0chu

on a linux distro like nixos /usr/share doesn't exist but XDG_DATA_DIRS is set to the location of hunspell files (if they are installed ofc) so we look for each directory in XDG_DATA_DIRS, check if theres an en_us dictionary in it, if not, fall back to previous /usr/share/... path tested this on my nixos and on an ubuntu docker image

p1k0chu · 9mo ago
PyScriptPlus

This PR modifies the color scheme of HunspellColorize to make misspelled words appear in red in the terminal. Previously, the program used ANSI bold sequences (\033[1m / \033[22m) which some terminals do not display clearly. Changes made: Updated START and STOP macros: #define START "\033[31m" #define STOP "\033[0m" This improves visibility of misspelled words and provides a clearer visual cue for users reading text through the program. The Hunspell functionality remains unchanged, and the program still correctly identifies misspelled words using the same dictionaries. Tested on WSL/Ubuntu with English dictionary (en_US.aff/en_US.dic). No additional dependencies are required. Suggested Usage: echo "This is a simpel txt" less -R Now, misspelled words like "simpel" and "txt" appear in red.

PyScriptPlus · 9mo ago
ASVLCII

returns on failure, which currently takes the parent branch because any nonzero value is treated as true. then reads from the new pipe even though no writer exists, so the original input disappears. Handle the error separately, close both pipe descriptors, destroy the Hunspell handle, and fall back to the normal path. The successful parent and child paths stay unchanged. Validation: passes. I could not run the Linux build locally because this Windows environment does not have Hunspell development headers or a POSIX toolchain.

ASVLCII · 1mo ago
AndreaBozzo

This PR adds my name to the README.md file, as i thought it would be cool to be on it! open to feedbacks on the implementation

AndreaBozzo · 3mo ago
Structured data for AI agents

Repository: torvalds/HunspellColorize. Description: Wrapper around 'less' to colorize spelling mistakes using Hunspell Stars: 401, Forks: 21. Primary language: C. Languages: C (95.4%), Makefile (4.6%). License: GPL-2.0. Open PRs: 3, open issues: 0. Last activity: 10mo ago. Community health: 42%. Top contributors: torvalds.