File: reflex.1

package info (click to toggle)
reflex 0.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 164 kB
  • sloc: makefile: 4
file content (103 lines) | stat: -rw-r--r-- 2,468 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
.TH REFLEX 1 "October 29, 2018" "version 0.2.0+git20181022.3df204f" "USER COMMANDS"

.SH NAME
Reflex \- Run a command when files change

.SH SYNOPSIS
.B reflex
[OPTIONS] [COMMAND]

.SH DESCRIPTION
Reflex is a small tool to watch a directory and rerun a command
when certain files change. It's great for automatically running
compile/lint/test tasks and for reloading your application when the
code changes.

.SH OPTIONS
.TP
.BR \-\-all=\fITrue|False\fR
Include normally ignored files (VCS and editor special files).
Defaults to False.

.TP
.BR \-c ", " \-\-config=\fIFILE\fR
A configuration file that describes how to run reflex (or '\-' to
read the configuration from stdin).

.TP
.BR \-d ", " \-\-decoration=\fIDECORATION\fR
How to decorate command output. Choices: none, plain, fancy. Default is plain.

.TP
.BR \-g ", " \-\-glob=\fIGLOB_LIST\fR
A shell glob expression to match filenames. (May be repeated.)

.TP
.BR \-G ", " \-\-inverse\-glob=\fIGLOB_LIST\fR
A shell glob expression to exclude matching filenames. (May be repeated.)

.TP
.BR \-R ", " \-\-inverse\-regex=\fIREGEX\fR
A regular expression to exclude matching filenames. (May be repeated.)

.TP
.BR \-\-only\-dirs=\fITrue|False\fR
Only match directories (not files). Defaults to false.

.TP
.BR \-\-only\-files=\fITrue|False\fR
Only match files (not directories). Defaults to false.

.TP
.BR \-r ", " \-\-regex=\fIREGEX\fR
A regular expression to match filenames. (May be repeated.)

.TP
.BR \-e ", " \-\-sequential=\fITrue|False\fR
Don't run multiple commands at the same time. Defaults to false.

.TP
.BR \-t ", " \-\-shutdown\-timeout=\fITIMEOUT\fR
Allow services this long to shut down. Defaults to 500ms.

.TP
.BR \-s ", " \-\-start\-service=\fITrue|False\fR
Indicates that the command is a long-running process to be
restarted on matching changes. Defaults to false.

.TP
.BR \-\-substitute=\fISTRING\fR
The substitution symbol that is replaced with the filename in a
command. Defaults to "{}"

.TP
.BR \-v ", " \-\-verbose=\fITrue|False\fR
Verbose mode: print out more information about what reflex is doing. Defaults to false.

.SH EXAMPLES
Print each .txt file if it changes:
.PP
.nf
.RS
reflex -r '\\.txt$' echo {}
.RE
.fi
.PP
Run
.BR make (1)
if any of the .c files in this directory change:
.PP
.nf
.RS
reflex -g '*.c' make
.RE
.fi
.PP
Build and run a server; rebuild and restart when .java files change:
.PP
.nf
.RS
reflex -r '\\.java$' -s -- sh -c 'make && java bin/Server'
.RE
.fi
.PP