https://github.com/gregoryv/trim
Convenient line trimmer with sane defaults
https://github.com/gregoryv/trim
Last synced: about 1 year ago
JSON representation
Convenient line trimmer with sane defaults
- Host: GitHub
- URL: https://github.com/gregoryv/trim
- Owner: gregoryv
- License: mit
- Created: 2022-11-30T05:59:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-05T07:53:40.000Z (over 1 year ago)
- Last Synced: 2025-02-05T07:19:23.799Z (over 1 year ago)
- Language: Go
- Size: 280 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
trim - Convenient line trimmer with sane defaults

## Quick start
$ go install github.com/gregoryv/cmd/trim@latest
$ trim -h
Usage: trim [OPTIONS]
Options
-c, --columns : 72
-s, --suffix : "..."
-t, --tab-width : 4
number of spaces
-l, --path-length : 20
trim paths to length
0 means no trimming and min length is 6
-h, --help
trim trims lines on stdin, e.g.
$ cat testdata/example.txt | trim
## Features
1. Trim by specific column
1. Indicate trim with suffix
1. Replace tabs with spaces
1. Replace $HOME/path with ~/path
1. Shorten paths