LinuxCommandLibrary

git-column

Format text into columns

TLDR

Format input as columns

$ echo "[a b c]" | git column
copy
Specify column mode
$ git column --mode=[column]
copy
Set column width
$ git column --width=[80]
copy
Set padding
$ git column --padding=[2]
copy

SYNOPSIS

git column [options]

DESCRIPTION

git column is a utility command that formats text input into multiple columns. While primarily used internally by Git to display lists (such as branch names, tag lists, or file listings) in a space-efficient columnar format, it's also available as a standalone formatting tool.
The command reads input from stdin and arranges it into columns based on terminal width or specified constraints. It supports different layout modes: column-first (fill columns top to bottom), row-first (fill rows left to right), or plain (no formatting). This matches Git's standard output behavior when listing items.
Advanced options allow controlling padding between columns, maximum width, and raw mode bits for fine-grained control over the layout algorithm. Git column can be useful in shell scripts or pipelines where columnar output improves readability of list data.

PARAMETERS

--mode mode

Column mode (column, row, plain).
--width width
Maximum width.
--padding num
Space between columns.
--raw-mode mode
Raw column mode bits.

SEE ALSO

column(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community