prompt
prompt copied to clipboard
Dynamic prompt

prompt
Dynamic Prompt.
Usage
This use glue to expand the function passed in, with the follwing bindings available:
tthe current time, in format "%H:%M:%S"vthe version of RVthe version of R, including the svn revisionuthe user namegthe github user namemthe memory currently used by Rwthe 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>
Installation
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)
License
MIT + file LICENSE ©