Created
September 12, 2020 21:03
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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