replace hard-coded github.com with new env variable
Opened this issue · 2 comments
Dear all,
I would like to propose the introduction of two new environment variables for ellipsis, $ELLIPSIS_DOMAIN
(defaulting to github.com
and $ELLIPSIS_SUFFIX
(defaulting to an empty string).
I personally keep my dot-repositories in a Gitlab instance. Being able to set ELLIPSIS_DOMAIN=gitlab.example.com
and using the shortcut ellipsis install mypackage
instead of typing the long URL would be really great! For now, I have an alias for installing packages from Gitlab, but I think it would make sense for this to be part of ellipsis. We already have $ELLIPSIS_PROTO
, $ELLIPSIS_USER
and $ELLIPSIS_PREFIX
, so this is the last missing piece to completely customise the URLs.
Also, Gitlab prefers a .git
suffix on its repo URLs. Running
git clone https://gitlab.example.com/r4lv/dot-common
works, but prints:
warning: redirecting to https://gitlab.example.com/r4lv/dot-common.git/
With an $ELLIPSIS_SUFFIX
set to .git
, this could be circumvented.
Let me know what you think!
Hi @r4lv
Thank you for the feedback!
As long as we can keep backward compatibility I don't see much (if any) downsides in adding some additional flexibility.
Given that this would add some more Git related variables, I do wonder if it might be better to bring them all under a new variable naming prefix; ELLIPSIS_GIT_<setting name>
That potentially keeps things a bit more clear for people that are new to ellipsis. (of course keeping the old names as well for compatibility) Let me know what you think! 🙂
Is this something you would like to contribute yourself?
I need to backup my dotfiles to github, and creating a local git repo isn't ideal. I see the advantages of this as a package manager with stow-like ability, but what is required is precisely what you propose. Ability to mirror to a server or githut etc.