Skip to content

Commit c6a0287

Browse files
committed
doc: init information
1 parent 2908a9c commit c6a0287

File tree

2 files changed

+68
-8
lines changed

2 files changed

+68
-8
lines changed

README.md

Lines changed: 65 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,59 @@ workflow should be supported.
2727

2828
## setup
2929

30+
Run `qvm init` and follow the instructions!
31+
32+
The instructions approximately will recommend:
33+
34+
add the following to your `~/.profile`:
35+
36+
```
37+
export PATH="$(qvm path add)"
38+
```
39+
40+
This will make sure the appropriate directories are prepended to your path to detect
41+
the managed quarto version.
42+
43+
NOTE: adding this to your profile instead of `~/.bashrc` or `~/.zshrc` will
44+
enable both the shell sessions *and* R sessions launched via Rstudio Workbench
45+
to pick up the change. If you only add to the `rc` file, it will only be present
46+
in the shell.
47+
48+
An example complete `~/.profile` file might look like:
49+
50+
```
51+
# ~/.profile: executed by the command interpreter for login shells.
52+
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
53+
# exists.
54+
# see /usr/share/doc/bash/examples/startup-files for examples.
55+
# the files are located in the bash-doc package.
56+
57+
# the default umask is set in /etc/profile; for setting the umask
58+
# for ssh logins, install and configure the libpam-umask package.
59+
#umask 022
60+
61+
# if running bash
62+
if [ -n "$BASH_VERSION" ]; then
63+
# include .bashrc if it exists
64+
if [ -f "$HOME/.bashrc" ]; then
65+
. "$HOME/.bashrc"
66+
fi
67+
fi
68+
69+
# set PATH so it includes user's private bin if it exists
70+
if [ -d "$HOME/bin" ] ; then
71+
PATH="$HOME/bin:$PATH"
72+
fi
73+
74+
# set PATH so it includes user's private bin if it exists
75+
if [ -d "$HOME/.local/bin" ] ; then
76+
PATH="$HOME/.local/bin:$PATH"
77+
fi
78+
79+
export PATH="$(qvm path add)"
80+
81+
```
82+
3083
### understanding what is available
3184

3285
which versions of quarto do you have installed?
@@ -49,6 +102,16 @@ qvm ls --remote -n 10 # latest 10 releases
49102
attempt to install all versions in parallel, and will coalesce and return
50103
any failures at the end.
51104

105+
You can also allow interactive selection and filtering by just
106+
running `qvm install`
107+
108+
```
109+
qvm install
110+
```
111+
112+
113+
114+
52115
```shell
53116
qvm install $QUARTO_VERSION $ANOTHER_QUARTO_VERSION
54117
```
@@ -57,13 +120,10 @@ qvm install $QUARTO_VERSION $ANOTHER_QUARTO_VERSION
57120
qvm install v0.9.466 v0.9.432
58121
```
59122

60-
can also allow interactive selection and filtering by just
61-
running `qvm install`
62-
63-
TODO: example of what this looks like:
123+
the `latest` keyword will dynamically install the latest version
64124

65125
```
66-
qvm install
126+
qvm install latest
67127
```
68128

69129
### updating which global version to use

cmd/init.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ func newInit(initOpts initOpts) error {
2323
activeIndex := strings.Index(os.Getenv("PATH"), activeDir)
2424
if activeIndex == -1 {
2525
fmt.Println("please add the active bin directory to your path")
26-
fmt.Println(`you can dynamically query the active bin directory by running: "qvm path active"
27-
if you would like to script this, you can add the following to your ~/.bashrc or ~/.zshrc:
28-
export PATH="$(qvm path add)")
26+
fmt.Println(`you can dynamically query the active quarto bin directory by running: "qvm path active"
27+
if you would like to script addin this path, you can add the following to your ~/.profile:
28+
export PATH="$(qvm path add)"
2929
`)
3030

3131
} else {

0 commit comments

Comments
 (0)