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

Feature Request: Dictionary to nickname hostname shown in prompt #488

Open
milezhacks opened this issue Jul 31, 2019 · 1 comment
Open

Comments

@milezhacks
Copy link

Suppose that powers-beyond-your-control set your hostname to something like b12ed7860b3a

So your prompt looks like:
~ user@b12ed7860b3a

Could you add a away to, instead of using the hostname auto-variable, use a host nickname dictionary to translate the actual hostname to a user's preference.

For example (in pseudo-code):

   # Read in aliases (HostDict)
   source ~/.host-alias

   if $HOSTNAME in HostDict:
      NICEHOST = HostDict[$HOSTNAME]
      HOSTPROMPT=$NICEHOST
   else
      HOSTPROMPT=%H
   fi
   PROMPT=%u@$HOSTPROMPT
@ELLIOTTCABLE
Copy link

Implemented this in #641.

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

No branches or pull requests

2 participants