3 releases
0.1.2 | Sep 21, 2024 |
---|---|
0.1.1 | Aug 31, 2024 |
0.1.0 | Aug 28, 2024 |
#410 in Command line utilities
169 downloads per month
15KB
284 lines
Refold
refold
is a commandline tool for performing text-wrapping, similar to unix fold
. Unlike fold
,
refold
will recombine lines before performing line-wrapping, and it will automatically detect
line prefixes.
Comparison to fold
refold |
unix fold |
|
---|---|---|
Rewrapping | Yes | No |
Line prefix support | Yes | No |
Line endings | LF and can auto detect CRLF | LF only |
Default wrapping | Soft via Unicode splittable property | Hard |
Hard wrapping | Yes | Yes |
Soft wrapping | Yes | Yes* |
*: fold
leaves trailing spaces and can only split ASCII space-separated words.
Example:
refold --spaces --width=100
:
/// I'd just like to interject for a moment. What you're refering to as Linux, is in fact, GNU/Linux,
/// or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the
/// GNU corelibs, shell utilities
/// and vital system components comprising a full OS as defined by POSIX.
->
/// I'd just like to interject for a moment. What you're refering to as Linux, is in fact,
/// GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating
/// system unto itself, but rather another free component of a fully functioning GNU system made
/// useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as
/// defined by POSIX.
Installing
Cargo (most platforms)
- Install Cargo.
- Run
cargo install refold
.
Binaries
Binaries for arm64
and x86_64
can be found in
the releases section of the github.
These are statically linked, so they should run on pretty much any linux distribution including NixOS and Alpine.
Additionally, these binaries are packaged in the following formats:
- APK
- DEB
- RPM
Nix
Alternatively, a Nix package can be found in the releases section. Unfortunately, refold
will not
be updated automatically when using this method.
- Download
refold.nix
from theReleases
page. - Add
(pkgs.callPackage /PATH/TO/REFOLD.NIX {})
to yourconfiguration.nix
file underenvironment.systemPackages
,users.users.YOUR_USERNAME.packages
, or in any other place that you can list packages.
Dependencies
~300KB