summaryrefslogtreecommitdiff
path: root/man/1/envstore
blob: 7e65bcea7940906014d52eff6254451321755433 (plain)
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
.Dd December 1, 2009
.Dt ENVSTORE 1
.Os
.Sh NAME
.Nm envstore
.Nd save and restore environment variables
.Sh SYNOPSIS
.Nm
.Ar command
.Op Ar args ...
.Sh DESCRIPTION
.Nm
can save and restore environment variables, thus transferring them between
different shells.
.Pp
.Ar command
must be one of
.Bl -tag -width "rm"
.It Cm clear
Forget all stored variables
.It Cm eval
Produce shell code for evaluation, restoring all saved variables
.It Cm list
List saved variables in better readable format
.It Cm save Ar variable Op Ar value
Save
.Ar variable
either with its current shell value or with
.Ar value
.It Cm rm Ar variable
Remove
.Ar variable from store
.El
.Pp
Note: Only the first character of
.Ar command
is checked, so
.Nm
.Cm e
instead of
.Nm
.Cm eval ,
.Nm
.Cm c
for
.Nm
.Cm clear ,
etc., are also valid.
.Sh ENVIRONMENT
.Bl -tag -width "ENVSTORE_FILE"
.It Ev ENVSTORE_FILE
The file in which the environment parameters are stored,
.Pa /tmp/envstore- Ns Va EUID
by default,
.El
.Sh LIMITATIONS
Variable names or values must not contain null bytes or newlines.
.Pp
Due to limitations imposed by most shells, it is not possible to save
parameters containing more than one consecutive whitespace.
.Nm
will save and display them correctly, but unless you do
.Ev IFS
trickery, your shell will not be able to load them.
.Pp
The current maximum length (in bytes) is 255 bytes for the variable name
and 1023 bytes for its content.
.Sh AUTHOR
.Nm
was written by
.An Daniel Friesel Aq derf@derf.homelinux.org .
.Pp
Original idea and script by
.An Maximilian Gass Aq mxey@ghosthacking.net .
.Sh SEE ALSO
.Xr envify 1