File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -420,7 +420,7 @@ if [ "$ZSH_VERSION" ] && [ "$0" != 'ksh' ] \
420
420
421
421
# Only display the $HOSTNAME for an ssh connection, except for a superuser
422
422
if _polyglot_is_ssh || _polyglot_is_superuser; then
423
- psvar[1]=$( print -P ' @%m ' )
423
+ psvar[1]=${HOST %% . * }
424
424
else
425
425
psvar[1]=' '
426
426
fi
@@ -536,7 +536,7 @@ elif [ "$KSH_VERSION" ] || _polyglot_is_dtksh || [ "$ZSH_VERSION" ] \
536
536
# Only display the $HOSTNAME for an ssh connection
537
537
if _polyglot_is_ssh || _polyglot_is_superuser; then
538
538
POLYGLOT_HOSTNAME_STRING=$( hostname)
539
- POLYGLOT_HOSTNAME_STRING=" @${POLYGLOT_HOSTNAME_STRING% ? ${POLYGLOT_HOSTNAME_STRING #* .} } "
539
+ POLYGLOT_HOSTNAME_STRING=" @${POLYGLOT_HOSTNAME_STRING%% . * } "
540
540
else
541
541
POLYGLOT_HOSTNAME_STRING=' '
542
542
fi
You can’t perform that action at this time.
0 commit comments