Changed hostname detection logic

Seems OS X no longer appends .local or .home to the actual hostname
which was causing my system name to always show up. Didn't really want
to default it to using my name (since I just let OS X manage my hostname
so it ends up being Joshs-whatever) but whatever
This commit is contained in:
Josh Sherman 2016-05-25 12:43:48 -05:00
parent 5eac850763
commit b7210e5767

View file

@ -5,10 +5,8 @@ function username() {
}
function server() {
if [[ `hostname` != *.home ]]; then
if [[ `hostname` != *.local ]]; then
echo "%{$FG[244]%}@%{$fg[magenta]%}%m "
fi
if [[ `hostname` != Joshs-* ]]; then
echo "%{$FG[244]%}@%{$fg[magenta]%}%m "
fi
}