It is inspired by the https://github.com/powerline/powerline project. This prompt uses some Unicode glyphs that work best with the fonts specifically modified for Powerline: https://github.com/powerline/fonts It also works best on consoles that support ANSI colors.
new_prompt_powerline(
parts = list("status", "memory", "loadavg", "path", "devtools", "git"),
colors = powerline_colors(parts)
)make_prompt_powerline() returns a function that you can
use with set_prompt().
List of strings and functions. Strings are for the
built-in powerline pieces, functions are arbitrary functions with
four parameters: expr, value, ok and visible, and they should
return a character string. The builtin pieces are:
status: Status of last command, a red or green box.
memory: Memory usage of the R process.
loadavg: The load average of the system, see ps::ps_loadavg().
path: Current working directory.
devtools: Package(s) loaded by pkgload::load_all() or the same
function of devtools.
git: git status, see prompt_git().
Colors of the parts. Builtin parts have default colors, but you can change them.
Other example prompts:
prompt_devtools(),
prompt_fancy(),
prompt_git(),
prompt_mem(),
prompt_runtime(),
prompt_status()