Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration option for mapping username/hostname per-host #641

Closed
wants to merge 7 commits into from

Conversation

ELLIOTTCABLE
Copy link

This PR implements a configuration-option that allows users to provide a mapping of replacement user- and host-names for systems they do not control, but often SSH into.

As an example, we use nspawn at my organization, and I do not have control over my username — this PR allows me to replace the infinitely-annoying elliott.cable@spawnbox-febox3-elliottcable with ec@nspawn3:

typeset -gA PURE_HOST_MAP
PURE_HOST_MAP[spawnbox-febox3-elliottcable]="elliott.cable:ec@nspawn3"

As for the rest, well, this is best understood from the documentation I've added to the README.

(Implementing this in a sufficiently-general way ended up being mildly messy; enough so that I'll understand if you don't wish to upstream this improvement. If not, I intend to main this feature in my fork; could you add ELLIOTTCABLE/pure to the list of maintained forks?)

This implements #488, and solves #614 and #136.

@sindresorhus
Copy link
Owner

Thanks for the pull request. However, I don't think this is something we want to maintain. What we could consider is exposing some kind of minimal hook to let you implement this yourself.

@ELLIOTTCABLE
Copy link
Author

However, I don't think this is something we want to maintain.
good eyes, and a reassuring response; I like slim.

any ideas of the best approach? i'm limited on time, but can take a brief glance if it's approachable to an outsider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants