sshaw/git-link

[request] resolve ~/.ssh/config hosts

emanresusername opened this issue ยท 2 comments

what i did

for reference

assuming i have the following in my ~/.ssh/config

Host git-1
    HostName github.com
    IdentityFile ~/.ssh/1/id_rsa
Host git-2
    HostName github.com
    IdentityFile ~/.ssh/2/id_rsa
Host git-3
    HostName github.com
    IdentityFile ~/.ssh/3/id_rsa
#... etc...

and a git repo with the following in its .git/config

[remote "origin"]
	url = ssh://git-1:org/repo.git

use git-link

what happened

no handler for git-1 :(

what i want

link to github.com/org/repo/path/to/whatever/is/appropriate

no idea what this would take, apologies in advance if it's one of these ๐Ÿ˜… https://xkcd.com/1425/

sshaw commented

Hi, thanks for the comic. I will be using that at work tomorrow.

As for your problem, you can add git-1 etc... to git-link-remote-alist.

So in your case, something like this (not tested):

(add-to-list 'git-link-remote-alist '("^git-[0-9]+" git-link-github))

Let me know if that works.

probably would have ๐Ÿ˜…
as it turned out this was all i needed and i could drop the fancy host ~/.ssh/config stuff ๐Ÿ‘Œ