pure
pure copied to clipboard
Feature Request: Dictionary to nickname hostname shown in prompt
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
Implemented this in #641.