Dynamic prompt
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 RV
the version of R, including the svn revisionu
the user nameg
the github user namem
the memory currently used by Rw
the current working directoryset_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" )
in a way that can be configured. Things we might want to display:
pryr::mem_used
MIT + file LICENSE ©