Skip to content

Commit

Permalink
Update documentation for --height.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddieantonio committed May 5, 2018
1 parent df526ea commit 495d105
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 10 deletions.
31 changes: 27 additions & 4 deletions docs/imgcat.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 2.0.3
.\"
.TH "IMGCAT" "1" "December 01, 2017" "imgcat User Manual" "meow"
.TH "IMGCAT" "1" "May 05, 2018" "imgcat User Manual" "meow"
.hy
.SH NAME
.PP
Expand All @@ -24,6 +24,10 @@ detected for your terminal.
These can be overridden using \f[B]\-w\f[] to adjust the maximum width
or \f[B]\-R\f[] to prevent resizing, even if the image is too big to fit
in the terminal; and \f[B]\-d\f[] to explicitly the set color depth.
You may also use \f[B]\-r\f[] to adjust the height ("r" for "number of
rows").
If only one of \f[B]\-w\f[] or \f[B]\-r\f[] is provided, the image will
be scaled without affecting the aspect ratio, if possible.
.PP
\f[B]Make sure your \f[BC]TERM\f[B] environment variable is set to a
terminfo with the full capabilities of you terminal!\f[] See
Expand All @@ -43,17 +47,36 @@ If not provided, the output color depth will be inferred with
.RS
.RE
.TP
.B \f[B]\-h\f[], \f[B]\-\-help\f[]
Show common options and quit.
.RS
.RE
.TP
.B \f[B]\-r\f[] \f[I]ROWS\f[], \f[B]\-\-height\f[]=\f[I]ROWS\f[]
Resizes the image to \f[I]ROWS\f[] characters high.
Does nothing if \f[B]\-\-no\-resize\f[] is provided.
Maintains the original image\[aq]s aspect ratio if \f[B]\-\-width\f[] is
NOT provided.
.RS
.RE
.TP
.B \f[B]\-R\f[], \f[B]\-\-no\-resize\f[]
Does not resize the image to fit the terminal\[aq]s width.
Overrides \f[B]\-\-width\f[].
Overrides both \f[B]\-\-width\f[] and \f[B]\-\-height\f[].
.RS
.RE
.TP
.B \f[B]\-v\f[], \f[B]\-\-version\f[]
Show version and quit.
.RS
.RE
.TP
.B \f[B]\-w\f[] \f[I]COLS\f[], \f[B]\-\-width\f[]=\f[I]COLS\f[]
Shrink the image to \f[I]COLS\f[] characters wide (maintaining aspect
ratio).
Shrink the image to \f[I]COLS\f[] characters wide.
Does nothing if \f[B]\-\-no\-resize\f[] is provided, or if the image is
already as small as the provided width.
Maintains the original image\[aq]s aspect ratio if \f[B]\-\-height\f[]
is NOT provided.
.RS
.RE
.TP
Expand Down
26 changes: 20 additions & 6 deletions docs/imgcat.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@ By default, the image is printed at the full width and color depth
detected for your terminal. These can be overridden using **-w** to
adjust the maximum width or **-R** to prevent resizing, even if the
image is too big to fit in the terminal; and **-d** to explicitly the
set color depth.
set color depth. You may also use **-r** to adjust the height ("r" for
"number of rows"). If only one of **-w** or **-r** is provided, the
image will be scaled without affecting the aspect ratio, if possible.

__Make sure your `TERM` environment variable is set to a terminfo with
the full capabilities of you terminal!__ See **Troubleshooting** if
you're having a problem with this.

If the output is not a terminal (that is, output is redirected to
a file, or piped into another program), then the image is **not**
resized and the color depth is set to 8 colors. Overriding both width
and color depth still work.
resized and the color depth is set to 8 colors. Overriding both width,
height, and color depth still work.

## Options

Expand All @@ -38,14 +40,26 @@ and color depth still work.
(alias of **ansi**), **256**, or **iterm**. If not provided, the
output color depth will be inferred with `tput colors`.

**-h**, **--help**
~ Show common options and quit.

**-r** _ROWS_, **--height**=_ROWS_
~ Resizes the image to _ROWS_ characters high.
Does nothing if **--no-resize** is provided. Maintains the original image's
aspect ratio if **--width** is NOT provided.

**-R**, **--no-resize**
~ Does not resize the image to fit the terminal's width. Overrides
**--width**.
both **--width** and **--height**.

**-v**, **--version**
~ Show version and quit.

**-w** _COLS_, **--width**=_COLS_
~ Shrink the image to _COLS_ characters wide (maintaining aspect ratio).
~ Shrink the image to _COLS_ characters wide.
Does nothing if **--no-resize** is provided, or if the image is
already as small as the provided width.
already as small as the provided width. Maintains the original image's
aspect ratio if **--height** is NOT provided.

**--8**, **--ansi**
~ Set the output colour depth to 8. Same as **--depth=8**.
Expand Down

0 comments on commit 495d105

Please sign in to comment.