All apps/GNU indent

GNU indent

gnu-indent

A program for formatting C source code.

Runs as gindent|macOS, Linux|www.gnu.org

Command form

ai-draft · 2 tasks · 10 fields

Reformat C files with a chosen coding style. Numeric options such as indent level, line length and tab size are left out.

Opens the form; the finished command lands at your prompt, unrun
otty gui gnu-indent
Format C sourceExample values, fixed in this page — nothing here reaches a terminal
Basic
Input files*
file
GNU style
--gnu-style
K&R style
--k-and-r-style
Linux style
--linux-style
Use spaces instead of tabs
--no-tabs
Write to standard output set by task
--standard-output
TasksEach one presets the form for one job
Preview to standard output
filesgnukrlinuxno_tabsstdout
Reformat in place
filesgnukrlinuxno_tabs
ParametersOnly these flags are editable in the form
Input files
path · positional 0 · repeatable
Output file
Only valid with a single input file.
path
-o
GNU style
boolean
--gnu-style-gnu
K&R style
boolean
--k-and-r-style-kr
Linux style
boolean
--linux-style-linux
Original Berkeley style
boolean
--original-orig
Use spaces instead of tabs
boolean
--no-tabs-nut
Write to standard output
Print the result instead of rewriting the files in place.
boolean
--standard-output-st
Ignore .indent.pro
boolean
--ignore-profile-npro
Verbose
boolean
--verbose-v
SourcesEvery flag above is checked against these
man
indent [options] [input-files] indent [options] [single-input-file] [-o output-file] -gnu, --gnu-style -kr, --k-and-r-style -linux, --linux-style -orig, --original -nut, --no-tabs -ut, --use-tabs -st, --standard-output -npro, --ignore-profile -v, --verbose
manual2.2.12

manpages.debian.org

Before it fills your prompt, Otty checks the installed gindent against its version. A form that does not match your version is not offered.