summaryrefslogtreecommitdiff
path: root/rc.1
diff options
context:
space:
mode:
authorToby Goodwin <toby@paccrat.org>2018-03-17 15:14:21 +0000
committerToby Goodwin <toby@paccrat.org>2018-03-17 15:14:21 +0000
commitcccdab7ea2bb922413f02698ecc5969c00e7a7aa (patch)
tree2d6291549e74bcf68fc7e46fc78be8ecd7cb8975 /rc.1
parent9c7ee8473a71303ab4cb51c9593089c07c224a22 (diff)
tidy up, test cases, document flag
Diffstat (limited to 'rc.1')
-rw-r--r--rc.130
1 files changed, 30 insertions, 0 deletions
diff --git a/rc.1 b/rc.1
index b2e7c52..0c602f3 100644
--- a/rc.1
+++ b/rc.1
@@ -1706,6 +1706,36 @@ If no argument is given, the current value of
.Cr $status
is used.
.TP
+\fBflag\fR \fIf\fR [ \fB+\fR | \fB\-\fR ]
+Test, set (\fB+\fR), or reset (\fB\-\fR) command-line flag
+.IR f .
+For example, a script that requires ``exit if command fails'' semantics can say
+.Ds
+.Cr "flag e +"
+.De
+.TP
+\&
+Some flags cannot be set or reset using
+.BR flag ,
+but they can still be tested. These are
+.BR c ,
+.BR d ,
+.BR l ,
+.BR o ,
+.BR p ,
+and
+.BR s .
+As a special case,
+.Cr "flag i"
+operates on
+.BR rc 's
+internal
+.IR interactive
+flag, which may have been set by
+.Cr -i
+on the command line, or if standard input was a terminal; there is no
+.Cr "flag I" .
+.TP
\fBlimit \fR[\fB\-h\fR] [\fIresource \fR[\fIvalue\fR]]
Similar to the
.IR csh (1)