Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f87c21
commit 3405989
Showing
2 changed files
with
44 additions
and
44 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
# prompt | ||
|
||
> Dynamic R Prompt | ||
<!-- badges: start --> | ||
[![Lifecycle Status](https://lifecycle.r-lib.org/articles/figures/lifecycle-experimental.svg)](https://www.tidyverse.org/lifecycle/) | ||
[![R build status](https://github.com/r-lib/prompt/workflows/R-CMD-check/badge.svg)](https://github.com/r-lib/prompt/actions) | ||
[![](http://www.r-pkg.org/badges/version/prompt)](http://www.r-pkg.org/pkg/prompt) | ||
[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/prompt)](http://www.r-pkg.org/pkg/prompt) | ||
<!-- badges: end --> | ||
|
||
![](https://user-images.githubusercontent.com/660288/109298654-3b181a80-7834-11eb-985e-a8f58ff553c7.png) | ||
|
||
Set the R prompt dynamically, from a function. The package contains some | ||
examples. The prompt on the screenshot has: | ||
* The status of the last command (success or failure). | ||
* The amount of memory allocated by the current R process. | ||
* The name of the R package being developed using | ||
[devtools](https://github.com/hadley/devtools). | ||
* Name of the active git branch. | ||
* State of the git working tree (needs pushes, pulls, and/or dirty). | ||
|
||
## Installation | ||
|
||
Install the package from CRAN, as usual: | ||
|
||
```r | ||
install.packages("prompt") | ||
``` | ||
|
||
## Usage | ||
|
||
Use the `prompt_fancy` prompt, as on the screenshot, or create your own. | ||
You can set the prompt in your `.Rprofile`. Maybe you only want to do this | ||
in interactive mode: | ||
|
||
```r | ||
if (interactive()) prompt::set_prompt(prompt_fancy) | ||
``` | ||
|
||
## License | ||
|
||
MIT © Gábor Csárdi |
This file was deleted.
Oops, something went wrong.