pure icon indicating copy to clipboard operation
pure copied to clipboard

Feature Request: Dictionary to nickname hostname shown in prompt

Open milezhacks opened this issue 4 years ago • 1 comments

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

milezhacks avatar Jul 31 '19 15:07 milezhacks

Implemented this in #641.

ELLIOTTCABLE avatar Aug 01 '22 17:08 ELLIOTTCABLE