nushell/docs/commands/format.md
JT 8c0a2d3c15
Auto-generate markdown command docs (#4451)
* Finish updating

* a couple improvements

* Update renames

* cleanup examples
2022-02-13 21:22:51 -05:00

432 B

title layout version
format command 0.59.0

Format columns into a string using a simple pattern.

Signature

> format (pattern)

Parameters

  • pattern: the pattern to output. e.g.) "{foo}: {bar}"

Examples

Print filenames with their sizes

> ls | format '{name}: {size}'

Print elements from some columns of a table

> echo [[col1, col2]; [v1, v2] [v3, v4]] | format '{col2}'