aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2025-06-29 12:17:42 -0400
committerEugene Triguba <eugenetriguba@gmail.com>2025-06-29 12:17:42 -0400
commit0cb6a2802b5816bcfcc67819fd0e9052dfad4428 (patch)
treeef12d4ea1ffe6ec7cb50fe32141847359afd33b7
parentAdd bats tests (diff)
downloadcli-0cb6a2802b5816bcfcc67819fd0e9052dfad4428.zip
Update README
-rw-r--r--README.md22
1 files changed, 21 insertions, 1 deletions
diff --git a/README.md b/README.md
index 859e18a..6c40843 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,24 @@
# Justify
-`justify` is a utility for justifying text.
+`justify` is a small utility for justifying text.
+## Usage
+
+```sh
+justify [-w WIDTH] < input.txt
+```
+- `-w`, `--width WIDTH`: Set the line width for justification (default: 72).
+- Input is read from standard input.
+- Output is written to standard output.
+- Any error messages are written to standard error.
+
+## How does it work?
+
+Justifying text means aligning the text so both the left and right edges
+of the text block are straight to create an even look. This is often used
+in printed materials like books and newspapers, and sometimes in formal
+documents.
+
+`justify` achieves this by adding extra space between words or letters to
+ensure that each line extends to the right margin. The last line of a
+paragraph is not justified and is aligned left.