Created by: berserck
Added possibility to show domain if host name is shown.
I've added the option LP_DOMAIN to show the domain if the host name is shown. I also edited the test.sh file to test for new feature.
I'm using the command hostname -f
instead of the \H
(for bash) and %M
(for zsh)
because I noticed that the \H
is bash is not the same in all systems (zsh is coherent):
In macos (bash 3.2.48(1)-release) and freeBSD(bash 4.2.45(0)-release) :
# hostname -f
host.domain
# export PS1=" \\\h=\h \\\H=\H #"
\h=host \H=host.domain #
In linux: SLC6 (bash: 4.1.2(1)-release), debian(bash:4.2.37(1)-release ) and ubunto(bash: 4.2.25(1)-release) ):
# hostname -f
host.domain
# export PS1=" \\\h=\h \\\H=\H #"
\h=host \H=host #