HomeFreeBSD

sh: Handle empty hostname and $PWD when building prompt

Description

sh: Handle empty hostname and $PWD when building prompt

If the hostname is empty and \h is used in $PS1,
the remainder of the prompt following \h will be empty.
Likewise for $PWD and \w. Fix it.

Reviewed by: jilles
MFC after: 1 week
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D6188

Details

Provenance
vangyzenAuthored on
Reviewer
jilles
Differential Revision
D6188: sh: Handle empty hostname and $PWD when building prompt
Parents
rS299034: Fix nvram2env after bus_space_fdt removal.
Branches
Unknown
Tags
Unknown