-
Notifications
You must be signed in to change notification settings - Fork 5
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
e651e3e
commit 7dce8e7
Showing
3 changed files
with
140 additions
and
0 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,5 @@ | ||
|
||
all: README.md | ||
|
||
README.md: README.Rmd | ||
Rscript -e "library(knitr); knit('$<', output = '$@', quiet = TRUE)" |
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,51 @@ | ||
|
||
```{r, setup, echo = FALSE, message = FALSE} | ||
knitr::opts_chunk$set( | ||
comment = "#>", | ||
tidy = FALSE, | ||
error = FALSE) | ||
``` | ||
|
||
# whoami | ||
|
||
> Username, full name, email address, GitHub username of the current user | ||
For the username it tries the `LOGNAME`, `USER`, `LNAME` and | ||
`USERNAME` environment variables first. If these are all unset, | ||
or set to an empty string, then it tries running `id` on Unix-like | ||
systems and `whoami` on Windows. | ||
|
||
For the full name of the user, it queries the system services and | ||
also tries the user's global git configuration. | ||
|
||
For the email address it users the user's global git configuration. | ||
|
||
For the GitHub usename it searches on GitHub for the user's email | ||
address. | ||
|
||
Related JavaScript packages: | ||
[sindresorhus/username](https://github.com/sindresorhus/username), | ||
[sindresorhus/fullname](https://github.com/sindresorhus/fullname), | ||
[sindresorhus/github-username](https://github.com/sindresorhus/github-username), | ||
[paulirish/github-email](https://github.com/paulirish/github-email). | ||
|
||
## Installation | ||
|
||
```{r, eval = FALSE} | ||
devtools::install_github("gaborcsardi/whoami") | ||
``` | ||
|
||
## Usage | ||
|
||
```{r} | ||
library(whoami) | ||
username() | ||
fullname() | ||
email_address() | ||
gh_username() | ||
whoami() | ||
``` | ||
|
||
## License | ||
|
||
MIT © [Gábor Csárdi](http://gaborcsardi.org) |
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,84 @@ | ||
|
||
|
||
|
||
|
||
# whoami | ||
|
||
> Username, full name, email address, GitHub username of the current user | ||
For the username it tries the `LOGNAME`, `USER`, `LNAME` and | ||
`USERNAME` environment variables first. If these are all unset, | ||
or set to an empty string, then it tries running `id` on Unix-like | ||
systems and `whoami` on Windows. | ||
|
||
For the full name of the user, it queries the system services and | ||
also tries the user's global git configuration. | ||
|
||
For the email address it users the user's global git configuration. | ||
|
||
For the GitHub usename it searches on GitHub for the user's email | ||
address. | ||
|
||
Related JavaScript packages: | ||
[sindresorhus/username](https://github.com/sindresorhus/username), | ||
[sindresorhus/fullname](https://github.com/sindresorhus/fullname), | ||
[sindresorhus/github-username](https://github.com/sindresorhus/github-username), | ||
[paulirish/github-email](https://github.com/paulirish/github-email). | ||
|
||
## Installation | ||
|
||
|
||
```r | ||
devtools::install_github("gaborcsardi/whoami") | ||
``` | ||
|
||
## Usage | ||
|
||
|
||
```r | ||
library(whoami) | ||
username() | ||
``` | ||
|
||
``` | ||
#> [1] "gaborcsardi" | ||
``` | ||
|
||
```r | ||
fullname() | ||
``` | ||
|
||
``` | ||
#> [1] "Gabor Csardi" | ||
``` | ||
|
||
```r | ||
email_address() | ||
``` | ||
|
||
``` | ||
#> [1] "csardi.gabor@gmail.com" | ||
``` | ||
|
||
```r | ||
gh_username() | ||
``` | ||
|
||
``` | ||
#> [1] "gaborcsardi" | ||
``` | ||
|
||
```r | ||
whoami() | ||
``` | ||
|
||
``` | ||
#> username fullname email_address | ||
#> "gaborcsardi" "Gabor Csardi" "csardi.gabor@gmail.com" | ||
#> gh_username | ||
#> "gaborcsardi" | ||
``` | ||
|
||
## License | ||
|
||
MIT © [Gábor Csárdi](http://gaborcsardi.org) |