X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=bin%2Fgit-codeowners;h=231b16bada4ced86b70ca600058f3663fc4e0b2e;hb=4b38ff1cb75d9b45d6620842ceb63b3ef6f62b4f;hp=e620ea8bb416d02cb08fbae884b35ffbb5647212;hpb=67e86f990f2556f12465052911eb7b96a03b8dcc;p=chaz%2Fgit-codeowners diff --git a/bin/git-codeowners b/bin/git-codeowners index e620ea8..231b16b 100755 --- a/bin/git-codeowners +++ b/bin/git-codeowners @@ -19,12 +19,35 @@ =head1 DESCRIPTION -F is yet another CLI tool for managing F files in -git repos. In particular, it can be used to quickly find out who owns -a particular file in a monorepo (or monolith). +F is yet another CLI tool for managing F files in git repos. In +particular, it can be used to quickly find out who owns a particular file in a monorepo (or +monolith). -B The interface of this tool and its modules will -probably change as I field test some things. Feedback welcome. +B The interface of this tool and its modules will probably change as I field +test some things. Feedback welcome. + +=head1 INSTALL + +There are several ways to install F to your system. + +=head2 from CPAN + +You can install F using L: + + cpanm App::Codeowners + +=head2 from GitHub + +You can also choose to download F as a self-contained executable: + + curl -OL https://raw.githubusercontent.com/chazmcgarvey/git-codeowners/solo/git-codeowners + chmod +x git-codeowners + +To hack on the code, clone the repo instead: + + git clone https://github.com/chazmcgarvey/git-codeowners.git + cd git-codeowners + make bootstrap # installs dependencies; requires cpanm =head1 OPTIONS @@ -42,6 +65,17 @@ Alias: C<-h> You can also use C<--manual> to print the full documentation. +=head2 --color + +Enable colorized output. + +Color is ON by default on terminals; use C<--no-color> to disable. Some environment variables may +also alter the behavior of colorizing output: + +=for :list +* C - Set to disable color (same as C<--no-color>). +* C - Set the number of supportable colors (e.g. 0, 16, 256, 16777216). + =head2 --format Specify the output format to use. See L. @@ -93,12 +127,47 @@ The C<--format> argument can be one of: * C - Comma-separated values (requires L) * C - Pretty JSON (requires L) * C - JSON (requires L) -* C - Table (requires L) +* C
- Table (requires L) * C - Tab-separated values (requires L) * C - YAML (requires L) * C - Custom format (see below) -You can specify a custom format using printf-like format sequences. +=head2 Custom + +You can specify a custom format using printf-like format sequences. These are the items that can be +substituted: + +=for :list +* C<%F> - Filename +* C<%O> - Owner or owners +* C<%P> - Project +* C<%T> - Pattern +* C<%n> - newline +* C<%t> - tab +* C<%%> - percent sign + +The syntax also allows padding and some filters. Examples: + + git-codeowners show -f ' * %-50F %O' # default for "show" + git-codeowners show -f '%{quote}F,%{quote}O' # ad hoc CSV + git-codeowners patterns -f '--> %{color:0c0}T' # whatever... + +Available filters: + +=for :list +* C - Quote the replacement string. +* C - Colorize the replacement string (if color is ON). +* C - Do not colorize replacement string. + +=head2 Table + +Table formatting can be done by one of several different modules, each with its own features and +bugs. The default module is L, but this can be overridden using the +C environment variable if desired, like this: + + PERL_TEXT_TABLE=Text::Table::HTML git-codeowners -f table + +The list of available modules is at L. =cut