Skip to content

Instantly share code, notes, and snippets.

@TTTPOB
Last active December 9, 2022 03:37
Show Gist options
  • Save TTTPOB/6d59c27794b4d0ffeb7942f36a6cf9e7 to your computer and use it in GitHub Desktop.
Save TTTPOB/6d59c27794b4d0ffeb7942f36a6cf9e7 to your computer and use it in GitHub Desktop.
# save this script somewhere and invoke it in shell.nix shellHook
# it will read current r and radian path and write it to vscode
# workspace settings
# jq required
settings=.vscode/settings.json
mkdir -p .vscode
echo '{}' > $settings
rpath_exsits=$(cat $settings|jq '."r.rpath.linux"')
rterm_exsits=$(cat $settings|jq '."r.rterm.linux"')
not_exsist="null"
rpath=$(which R)
rterm=$(which radian)
cat $settings |
jq '."r.rpath.linux"='\"$rpath\" | tee $settings
cat $settings |
jq '."r.rterm.linux"='\"$rterm\" | tee $settings
@l-d-s
Copy link

l-d-s commented Dec 9, 2022

Hi @TTTPOB , is this workaround still your preferred solution?

Can't tell if the issue has been otherwise resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment