Skip to content

Instantly share code, notes, and snippets.

@mxblsdl
Created September 12, 2020 21:03
Show Gist options
  • Save mxblsdl/42c251578a514fb942a64a264b97d099 to your computer and use it in GitHub Desktop.
Save mxblsdl/42c251578a514fb942a64a264b97d099 to your computer and use it in GitHub Desktop.
set your prompt to display the current git branch. Should be added to the .Rprofile file
if(requireNamespace("prompt", quietly = T)) {
prompt_git <- function(...) {
paste0(
"[", prompt::prompt_git(), "]", "> "
)
}
prompt::set_prompt(prompt_git)
rm(prompt_git)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment