-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathhelp-linux.in
More file actions
217 lines (163 loc) · 7.64 KB
/
Copy pathhelp-linux.in
File metadata and controls
217 lines (163 loc) · 7.64 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
// -*- mode: rust -*-
// ------------------------------------------------------------------------
// macOS help
// ------------------------------------------------------------------------
const HELP_ABOUT: &str = "";
const HELP_EXAMPLES: &str = "\x1b[4m\x1b[1mExamples:\x1b[22m\x1b[24m
# Add the latest development snapshot
rig add devel
# Add the latest release
rig add release
# Install specific version
rig add 4.1.2
# Install latest version within a minor branch
rig add 4.1
# List installed versions
rig list
# Set default version
rig default 4.1.2";
const HELP_RESOLVE: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Resolve R versions. Check the version number of an R version (e.g.
release, devel, etc.), and look up the URL of the installer for it,
if an installer is available.
It prints the R version number, and after a space the URL of the
installer. If no installer is available for this R version and the
current platform, the URL is `NA`.
An R version can be specified in various ways:
- `rig resolve devel` is the latest available development version,
- `rig resolve next` is the next (patched, alpha, beta, etc.) version,
- `rig resolve release` is the latest release.
- `rig resolve x.y.z` is a specific version.
- `rig resolve x.y` is the latest release within the `x.y` minor branch.
- `rig resolve oldrel/n` is the latest release within the `n`th previous
minor branch (`oldrel` is the same as `oldrel/1`).";
const HELP_RESOLVE_EXAMPLES: &str = "\x1b[4m\x1b[1mExamples:\x1b[22m\x1b[24m
# Latest development snapshot
rig resolve devel
# Latest release (that has an installer available)
rig resolve release
# URL for a specific version
rig resolve 4.1.2
# Latest version within a minor branch
rig resolve 4.1";
const HELP_DEFAULT: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Print or set the default R version. The default R version is the one that
is started with the `R` command, via the `/usr/local/bin/R` symbolic link.
Call without any arguments to see the current default. Call with the
version number/name to set the default. Before setting a default, you
can call `rig list` to see the installed R versions.
The default R version is set by updating the symbolic link at
`/opt/R/current` and pointing it to the specified R version. If you have
never set the default version, then there is no default.
You need to run this command with `sudo` to change the default version:
`sudo rig default ...`.
You don't need to update the default R version to just run a non-default R
version. You can use the `R-<ver>` links, see `rig system make-links`.
`rig switch` is an alias of `rig default`.";
const HELP_DEFAULT_EXAMPLES: &str = "\x1b[4m\x1b[1mExamples:\x1b[22m\x1b[24m
# Query default R version
rig default
# Set the default version
rig default 4.1.2";
const HELP_LIST: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
List installed R versions from `/opt/R`. It does _not_ check if they are
working properly.
`rig ls` is an alias.";
const HELP_ADD: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Download and install an R version, from the official sources.
It keeps the already installed R versions.
rig uses the Posit R builds from `https://github.com/rstudio/r-builds`
on Linux.
The desired R version can be specified in various ways:
- `rig add devel` adds the latest available development version,
- `rig add next` is the next version (patched, alpha, beta, rc, etc.),
- `rig add release` adds the latest release.
- `rig add x.y.z` adds a specific version.
- `rig add x.y` adds the latest release within the `x.y` minor branch.
- `rig add oldrel/n` adds the latest release within the `n`th previous
minor branch (`oldrel` is the same as `oldrel/1`).
- `rig add renv.lock` or `rig add <dir>` installs the R version specified
in the renv.lock file. If a directory is given, rig looks for an
renv.lock file in that directory.
You need to run this command with `sudo`: `sudo rig add ...`,
otherwise rig will need to ask for your password.
`rig add` will automatically call `rig system forget` before the
installation, to make sure that already installed R versions are kept.
`rig add` will also call the following rig command after the installation:
- `rig system create-lib`
- `rig system make-links`
See their help pages for details.";
const HELP_ADD_EXAMPLES: &str = "\x1b[4m\x1b[1mExamples:\x1b[22m\x1b[24m
# Add the latest development snapshot
rig add devel
# Add the latest release
rig add release
# Install specific version
rig add 4.1.2
# Install latest version within a minor branch
rig add 4.1
# Install the R version specified in renv.lock
rig add renv.lock
# Install R version from a project's renv.lock
rig add path/to/project";
const HELP_RM: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Remove an R installation. It keeps the users' package libraries.
Usually you need to run this command with `sudo`: `sudo rig rm ...`,
otherwise rig will ask for your password.";
const HELP_SYSTEM: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Various commands to modify and configure the installed R versions.
See their help pages for details. E.g. run `rig system make-links --help`.";
const HELP_SYSTEM_LINKS: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Create quick links in `/usr/local/bin` for the current R installations.
This lets you directly run a specific R version. E.g. `R-4.1.2` will start
R 4.1.2.
`rig add` runs `rig system make-links`, so if you only use rig to
install R, then you do not need to run it manually.
This command probably needs `sudo`: `sudo rig system make-links`,
otherwise rig will ask for your password.";
const HELP_SYSTEM_ADDPAK: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Install/update pak for one or more R versions.
* If `--all` is specified, then it installs pak for all current R
installations.
* If one or more R versions are specified, then it installs pak for
those.
* If no R versions are specified, then it installs pak for the default
R installation (see `rig default`).";
const HELP_RSTUDIO: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Start RStudio with the specified R version.
If `project-file` is an RStudio `.Rproj` file, or a directory containing
an RStudio project file, RStudio will open the project.
If `project-file` is a directory that does not contain an RStudio
project file, then RStudio will start up without an active project,
but will set the working directory to the specified directory.
If `project-file` is a regular file that is not inside a directory
containing an RStudio project, then RStudio will start up without an
active project, but it will open the specified file, and will set the
working directory to the directory of the file.
If the RStudio project or the specified directory contains an `renv.lock`
file (created by the renv package), and `version` is not specified, then
rig will read the preferred R version from the `renv.lock` file.
If the same exact version is not installed, then rig chooses
the latest version with the same major and minor components. If no such
version is available, rig throws an error.
\x1b[4m\x1b[1mExamples:\x1b[22m\x1b[24m
# With default R version
rig rstudio
# With another R version
rig rstudio 4.0
# Open project with default R version
rig rstudio cli.Rproj
# Open renv project with the R version specified in the lock file
rig rstudio projects/myproject/renv.lock
# Open RStudio project with specified R version, either is good
rig rstudio 4.0 cli.Rproj
rig rstudio cli.Rproj 4.0";