-
Notifications
You must be signed in to change notification settings - Fork 6
/
renv.1
77 lines (77 loc) · 2.04 KB
/
renv.1
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
.\"
.\" Copyright (c) 2023 Eric Radman <[email protected]>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd September 24, 2024
.Dt RENV 1
.Os
.Sh NAME
.Nm renv
.Nd normalize environment variables
.Sh SYNOPSIS
.Nm renv
.Ar file ...
.Op Fl q
.Nm renv
.Ar name="value" Op file
.Sh DESCRIPTION
Filter environment variables in a format suitable for
.Xr sh 1 .
Only lines defining variable names using the characters
.Bq _a-zA-Z0-9
with a value in double-quotes are emitted.
Values may also be empty.
.Pp
.Dl A="one"
.Dl B="two"
.Dl D=""
.Pp
If the first argument is in the format
.Ql name=value
.Nm
will store and environment for reference in subsequent labels.
By default entries are appended to
.Pa $SD/local.env .
.Pp
Optional arguments are as follows:
.Bl -tag -width Ds
.It Fl q
Validate only, do not print lines.
.El
.Sh LITERALS
Escape sequences starting with
.Sq \e ,
or subshells using
.Sq $(...)
are not permitted.
.Pp
.Ql \&$$
expands to a single dollar sign.
.Sh EXAMPLES
Print environment variables in a normalized format
.Pp
.Dl $ renv final.env
.Pp
Save the status code of the last command
.Pp
.Dl $ renv LAST_EXITSTATUS="$?"
.Sh SEE ALSO
.Xr rset 1
.Sh CAVEATS
Tabs and multiple spaces are converted to into a single space.
There is no provision for embedding literal double-quotes.
.Pp
.Nm
must be found in the current working directory or in the path defined by
.Ev SD .