Simple extendable line counter
go install github.com/mymmrac/the-line@latest
# Optionally rename binary
mv $GOPATH/bin/the-line $GOPATH/bin/tl
NOTE: Make sure to add
$GOPATH/bin
to$PATH
to use
# Search for all files/folders in current dir and count lines in Go files
tl -p go -r .
# Help info
tl --help
List of supported features (or TBD features)
- Match
- Prefix/suffix
- Contains
- Length
- Regexp
- Blank
- Any
- Union
- Intersection
- Not
- Trim spaces/prefix/suffix
- To lower
- Embedded (default config included in binary)
- YAML (user defined config)
- Pretty interface using Charm
- Minimal output (regular stdout)
- Output only total
- Output grouped by folders
- Show used/matched by profiles/skipped files
- Main
- Display
- Make packages