Skip to content

Nicer adding/installations of github repositories #404

@gwangjinkim

Description

@gwangjinkim

A package manager from Common Lisp, roswell, uses the syntax:

ros install githubaccount/githubrepo

and installs then automatically from github.

With time I really love this feature. And I am pretty sure, that people will love it. It is super convenitent.

rv add githubaccount/githubrepo

Instead of

rv add package --git https://github.com/githubaccount/githubrepo --commit 223423

Something like:

rv add <repo-spec>...

<repo-spec> :=
  <owner>/<repo> [ "@" <ref> ] [ ":" <subdir> ]
| <git-url>        [ "@" <ref> ] [ ":" <subdir> ]

<ref> := <branch> | <tag> | <commit-sha>
<subdir> := path/inside/repo

resulting in:

# default branch
rv add tidyverse/dplyr

# branch
rv add tidyverse/dplyr@main
rv add tidyverse/dplyr@feature/new-api

# tag
rv add r-lib/cli@v3.6.2

# commit SHA
rv add r-lib/rlang@9a8c5d2

# repo with package living in a subdir
rv add r-lib/usethis@v2.2.3:r-package

# full git URL (https or ssh) also works
rv add https://github.com/r-lib/cli.git@v3.6.2
rv add git@github.com:r-lib/cli.git@v3.6.2

or explicit ref prefixes:

@branch:<name>
@tag:<tag>
@commit:<sha>

used like:

rv add r-lib/cli@tag:v3.6.2
rv add r-lib/cli@branch:main
rv add r-lib/cli@commit:9a8c5d2

As syntactic sugar? And keeping the CLI flags as fallback?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions