blob: f58e9c43e60cec3b56fb84f54859f3d01d1a963a [file] [log] [blame]
Junio C Hamano22700fb2012-05-03 23:07:251git-column(1)
2=============
3
4NAME
5----
6git-column - Display data in columns
7
8SYNOPSIS
9--------
10[verse]
11'git column' [--command=<name>] [--[raw-]mode=<mode>] [--width=<width>]
Junio C Hamano010705a2012-06-19 23:37:2612 [--indent=<string>] [--nl=<string>] [--padding=<n>]
Junio C Hamano22700fb2012-05-03 23:07:2513
14DESCRIPTION
15-----------
Junio C Hamano32a75272018-10-16 07:37:3516This command formats the lines of its standard input into a table with
17multiple columns. Each input line occupies one cell of the table. It
18is used internally by other git commands to format output into
19columns.
Junio C Hamano22700fb2012-05-03 23:07:2520
21OPTIONS
22-------
23--command=<name>::
24Look up layout mode using configuration variable column.<name> and
25column.ui.
26
27--mode=<mode>::
28Specify layout mode. See configuration variable column.ui for option
Junio C Hamano32a75272018-10-16 07:37:3529syntax in linkgit:git-config[1].
Junio C Hamano22700fb2012-05-03 23:07:2530
31--raw-mode=<n>::
32Same as --mode but take mode encoded as a number. This is mainly used
33by other commands that have already parsed layout mode.
34
35--width=<width>::
36Specify the terminal width. By default 'git column' will detect the
37terminal width, or fall back to 80 if it is unable to do so.
38
39--indent=<string>::
40String to be printed at the beginning of each line.
41
42--nl=<N>::
43String to be printed at the end of each line,
44including newline character.
45
46--padding=<N>::
47The number of spaces between columns. One space by default.
48
Junio C Hamano32a75272018-10-16 07:37:3549EXAMPLES
Junio C Hamanoace33e42019-01-18 23:16:0550--------
Junio C Hamano32a75272018-10-16 07:37:3551
52Format data by columns:
53------------
54$ seq 1 24 | git column --mode=column --padding=5
551 4 7 10 13 16 19 22
562 5 8 11 14 17 20 23
573 6 9 12 15 18 21 24
58------------
59
60Format data by rows:
61------------
62$ seq 1 21 | git column --mode=row --padding=5
631 2 3 4 5 6 7
648 9 10 11 12 13 14
6515 16 17 18 19 20 21
66------------
67
68List some tags in a table with unequal column widths:
69------------
70$ git tag --list 'v2.4.*' --column=row,dense
71v2.4.0 v2.4.0-rc0 v2.4.0-rc1 v2.4.0-rc2 v2.4.0-rc3
72v2.4.1 v2.4.10 v2.4.11 v2.4.12 v2.4.2
73v2.4.3 v2.4.4 v2.4.5 v2.4.6 v2.4.7
74v2.4.8 v2.4.9
75------------
76
Junio C Hamano22700fb2012-05-03 23:07:2577GIT
78---
79Part of the linkgit:git[1] suite