-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
66 lines (48 loc) · 2.16 KB
/
README
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
usage: envd <name> [<name>] [<name>=<value>] -- <command> [arguments…]
envd <name> [<name>] [<name>=<value>]
envd --list | -l
envd --help | -h
An envdir replacement improved for interactive use.
Runs the given <command> with optional [arguments…] after modifying the
environment using the named environment directories (envdirs).
Named envdirs are found by looking inside "env.d" directories found in the
current directory and upwards in the directory hierarchy. The search stops
when it hits the filesystem root (/) or $HOME. If you're within the safety
of your home directory, this ensures you won't pick up env.d directories
potentially outside of your control. Run "envd --list" from any directory to
see the env.d directories under consideration for that location.
Any argument starting with a slash (/) will be treated as an absolute path to
an envdir. Any argument starting with "../" will be treated as a relative
path to an envdir. Other relative paths may be given if they do not also
match a named envdir in any of the searched "env.d" directories.
Any arguments which contain an equals sign will be treated as an ad-hoc
key-value pair to inject into the environment (similar to the "env" command's
syntax) as if it was an entry in an envdir.
Any <command> must be separated from envdir <name>s by a double hyphen (--).
If no <command> is given, "env" is run which will print the contents of the
environment.
Bash completion is available for <name>s and options. Enable it by adding
the following to your ~/.bashrc file:
source <(envd --complete)
As an example, given the following:
$ pwd
/home/tom/seattleflu/backoffice/id3c-production
$ envd --list
/home/tom/seattleflu/backoffice/id3c-production/env.d
redcap-kiosk
redcap-swab-n-send
uwsgi
/home/tom/seattleflu/env.d
id3c
slack-webhook-test
/home/tom/env.d
github
swift-v1-bedford
swift-v1-tsibley
swift-v2
Then
envd redcap-kiosk id3c -- <command>
is equivalent to:
envdir /home/tom/seattleflu/backoffice/id3c-production/env.d/redcap-kiosk \
envdir /home/tom/seattleflu/env.d/id3c \
<command>