rocker-org / devcontainer-features

A collection of Dev Container Features.
https://rocker-project.org/images/devcontainer/features.html
MIT License
52 stars 16 forks source link

New Feature: R terminal history #190

Closed eitsupi closed 1 year ago

eitsupi commented 1 year ago

It would be great if the history of R Terminal (including Radian) could be made persistent, as like the popular ghcr.io/stuartleeks/dev-container-features/shell-history. Perhaps a lifecycle script could accomplish that.

eitsupi commented 1 year ago

For R, perhaps specifying it in an environment variable R_HISTFILE would suffice?

https://stat.ethz.ch/R-manual/R-devel/library/base/html/Startup.html

"R_HISTFILE": "/dc/r-history/.Rhistory"

For Radian, I think just write something like the following to $XDG_CONFIG_HOME/radian/profile or $HOME/.config/radian/profile.

https://github.com/randy3k/radian?tab=readme-ov-file#settings

options(radian.global_history_file = "/dc/r-history/.radian_history")