ThinkR Open Prompt Save

Dynamic prompt

Project README


Dynamic Prompt.


This use glue to expand the function passed in, with the follwing bindings available:

  • t the current time, in format "%H:%M:%S"
  • v the version of R
  • V the version of R, including the svn revision
  • u the user name
  • g the github user name
  • m the memory currently used by R
  • w the current working directory
set_prompt( ~ "{t}> " )
set_prompt( ~ "{w}> " )
set_prompt( ~ "[{m}] {t} {w}> ")

You can use expand_prompt to experiment :

expand_prompt( ~ "{t}> " )
## 11:39:42>
expand_prompt( ~ "{w}> " )
## /Users/romain/git/prompt>
expand_prompt( ~ "[{m}] {t} {w}> ")
## [36 MB] 11:39:42 /Users/romain/git/prompt>


install_github( "ThinkR-open/prompt" )

Initial ideas

in a way that can be configured. Things we might want to display:

  • current time
  • memory used pryr::mem_used
  • current working directory, maybe slightly differently when it's not the directory of the current rstudio project
  • are we developping a package ? Do we need to rebuild it ?
  • are we sync with github
  • R version
  • ...
  • (please add your own with PR)


MIT + file LICENSE ©

Open Source Agenda is not affiliated with "ThinkR Open Prompt" Project. README Source: ThinkR-open/prompt
Open Issues
Last Commit
5 years ago

Open Source Agenda Badge

Open Source Agenda Rating