Remove man page and zsh completion file

The files are automatically generated, but using rake's `file` task does not
work correctly when the files are checked into the repo since the timestamps are
updated independently of the commit time.

Removing them ensures that these files are always freshly generated before
building the gem and thus are always up-to-date which was often not the case in
the past.
This commit is contained in:
Claudio Bley 2022-03-20 21:51:32 +01:00
parent 092e25a83b
commit 7100c41703
4 changed files with 5 additions and 227 deletions

View file

@ -40,9 +40,11 @@ OPTION
File.write('man/colorls.1', doc.convert('roff'))
end
directory 'zsh'
desc 'Build the Zsh completion file'
file 'zsh/_colorls' => ['lib/colorls/flags.rb'] do
file 'zsh/_colorls' => %w[zsh lib/colorls/flags.rb] do
ruby "exe/colorls '--*-completion-zsh=colorls' > zsh/_colorls"
end
task default: %w[spec rubocop]
task default: %w[spec rubocop man/colorls.1 zsh/_colorls]

View file

@ -49,7 +49,7 @@ Gem::Specification.new do |spec|
spec.required_ruby_version = '>= 2.6.0'
spec.files = IO.popen(
spec.files = %w[man/colorls.1 man/colorls.1 zsh/_colorls] + IO.popen(
%w[git ls-files -z], external_encoding: Encoding::ASCII_8BIT
).read.split("\x0").reject do |f|
f.match(%r{^(test|spec|features)/})

View file

@ -1,175 +0,0 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "COLORLS" "1" "January 2021" "colorls 1.4.4" "colorls Manual"
.
.SH "NAME"
\fBcolorls\fR \- list directory contents with colors and icons
.
.SH "SYNOPSIS"
\fBcolorls\fR [OPTION]\.\.\. [FILE]\.\.\.
.
.br
.
.SH "DESCRIPTION"
List information about the given FILEs\. Uses different colors and icons for known file types\.
.
.P
By default, the output is sorted alphabetically\.
.
.P
Mandatory arguments to long options are mandatory for short options too\.
.
.SH "OPTIONS"
.
.TP
\fB\-a\fR, \fB\-\-all\fR
do not ignore entries starting with \.
.
.TP
\fB\-A\fR, \fB\-\-almost\-all\fR
do not list \. and \.\.
.
.TP
\fB\-d\fR, \fB\-\-dirs\fR
show only directories
.
.TP
\fB\-f\fR, \fB\-\-files\fR
show only files
.
.TP
\fB\-\-gs\fR, \fB\-\-git\-status\fR
show git status for each file
.
.TP
\fB\-\-report\fR
show brief report
.
.TP
\fB\-\-format\fR
use format: across (\-x), horizontal (\-x), long (\-l), single\-column (\-1), vertical (\-C)
.
.TP
\fB\-1\fR
list one file per line
.
.TP
\fB\-\-tree\fR
shows tree view of the directory
.
.TP
\fB\-x\fR
list entries by lines instead of by columns
.
.TP
\fB\-C\fR
list entries by columns instead of by lines
.
.TP
\fB\-l\fR, \fB\-\-long\fR
use a long listing format
.
.TP
\fB\-o\fR
use a long listing format without group information
.
.TP
\fB\-g\fR
use a long listing format without owner information
.
.TP
\fB\-G\fR, \fB\-\-no\-group\fR
show no group information in a long listing
.
.TP
\fB\-\-sd\fR, \fB\-\-sort\-dirs\fR, \fB\-\-group\-directories\-first\fR
sort directories first
.
.TP
\fB\-\-sf\fR, \fB\-\-sort\-files\fR
sort files first
.
.TP
\fB\-t\fR
sort by modification time, newest first
.
.TP
\fB\-U\fR
do not sort; list entries in directory order
.
.TP
\fB\-S\fR
sort by file size, largest first
.
.TP
\fB\-X\fR
sort by file extension
.
.TP
\fB\-\-sort\fR
sort by WORD instead of name: none, size (\-S), time (\-t), extension (\-X)
.
.TP
\fB\-r\fR, \fB\-\-reverse\fR
reverse order while sorting
.
.TP
\fB\-h\fR, \fB\-\-human\-readable\fR:
.
.TP
\fB\-\-color\fR
colorize the output: auto, always (default if omitted), never
.
.TP
\fB\-\-light\fR
use light color scheme
.
.TP
\fB\-\-dark\fR
use dark color scheme
.
.TP
\fB\-\-hyperlink\fR:
.
.TP
\fB\-\-help\fR
prints this help
.
.TP
\fB\-\-version\fR
show version
.
.SH "EXAMPLES"
.
.TP
show the given file:
.
.IP
\fBcolorls README\.md\fR
.
.TP
show matching files and list matching directories:
.
.IP
\fBcolorls *\fR
.
.TP
filter output by a regular expression:
.
.IP
\fBcolorls | grep PATTERN\fR
.
.TP
several short options can be combined:
.
.IP
\fBcolorls \-d \-l \-a\fR
.
.br
\fBcolorls \-dla\fR
.
.SH "AUTHOR"
Written by Athitya Kumar\.

View file

@ -1,49 +0,0 @@
#compdef colorls
typeset -A opt_args
local context state line
_arguments -s -S \
"-a[do not ignore entries starting with .]" \
"--all[do not ignore entries starting with .]" \
"-A[do not list . and ..]" \
"--almost-all[do not list . and ..]" \
"-d[show only directories]" \
"--dirs[show only directories]" \
"-f[show only files]" \
"--files[show only files]" \
"--gs[show git status for each file]" \
"--git-status[show git status for each file]" \
"--report[show brief report]" \
"--format[use format: across (-x), horizontal (-x), long (-l), single-column (-1), vertical (-C)]" \
"-1[list one file per line]" \
"--tree[shows tree view of the directory]" \
"-x[list entries by lines instead of by columns]" \
"-C[list entries by columns instead of by lines]" \
"-l[use a long listing format]" \
"--long[use a long listing format]" \
"-o[use a long listing format without group information]" \
"-g[use a long listing format without owner information]" \
"-G[show no group information in a long listing]" \
"--no-group[show no group information in a long listing]" \
"--sd[sort directories first]" \
"--sort-dirs[sort directories first]" \
"--group-directories-first[sort directories first]" \
"--sf[sort files first]" \
"--sort-files[sort files first]" \
"-t[sort by modification time, newest first]" \
"-U[do not sort; list entries in directory order]" \
"-S[sort by file size, largest first]" \
"-X[sort by file extension]" \
"--sort[sort by WORD instead of name: none, size (-S), time (-t), extension (-X)]" \
"-r[reverse order while sorting]" \
"--reverse[reverse order while sorting]" \
"-h[]" \
"--human-readable[]" \
"--color[colorize the output: auto, always (default if omitted), never]" \
"--light[use light color scheme]" \
"--dark[use dark color scheme]" \
"--hyperlink[]" \
"--help[prints this help]" \
"--version[show version]" \
'*:file:_files' && return 0