Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This will change your prompt and screen/tmux tab title based on how many
- # fields there are in the FQDN. For a normal 3 field FQDN, it will use field1
- # like normal. For 4+ fields it will set it to field1.field2.
- #
- # Thanks to Paul Jimenez <pj at place dot org> for the sed regex.
- # Rename screen window
- function rename_screen_tab () { echo -ne "\x1bk$@\x1b\\"; return 0; }
- # Set up the prompt and screen tab name
- MYHOST=`echo $HOSTNAME | sed 's/[.][^.]*[.][^.]*$//'`
- [[ $TERM == "screen" ]] && PROMPT_COMMAND='rename_screen_tab ${MYHOST}'
- PS1="\d \A \w\n\u@$MYHOST > "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement