]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sh: Handle empty hostname and $PWD when building prompt
authorEric van Gyzen <vangyzen@FreeBSD.org>
Wed, 4 May 2016 02:06:46 +0000 (02:06 +0000)
committerEric van Gyzen <vangyzen@FreeBSD.org>
Wed, 4 May 2016 02:06:46 +0000 (02:06 +0000)
commit8e3543eebcbded967c4d921272064691880174d2
tree8287a7c6693f4917393dd8323612dd64f9039fc0
parentcdd2592ffd82d39de6430346c4807a20bd1a79eb
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
bin/sh/parser.c