Page MenuHomeFreeBSD

sh: Handle empty hostname and $PWD when building prompt
ClosedPublic

Authored by vangyzen on May 3 2016, 5:20 PM.
Tags
None
Referenced Files
F106653443: D6188.diff
Fri, Jan 3, 10:40 AM
Unknown Object (File)
Wed, Dec 4, 6:35 PM
Unknown Object (File)
Nov 28 2024, 11:42 AM
Unknown Object (File)
Oct 2 2024, 5:44 PM
Unknown Object (File)
Oct 1 2024, 4:44 PM
Unknown Object (File)
Sep 27 2024, 11:54 PM
Unknown Object (File)
Sep 27 2024, 12:10 PM
Unknown Object (File)
Sep 12 2024, 2:58 AM
Subscribers

Details

Summary

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.

Test Plan

I set PS1='\h \W \$ ' and tested with an empty
hostname and $PS1.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3556
Build 3596: arc lint + arc unit

Event Timeline

vangyzen retitled this revision from to sh: Handle empty hostname and $PWD when building prompt.
vangyzen updated this object.
vangyzen edited the test plan for this revision. (Show Details)
vangyzen added a reviewer: jilles.

Oops. Only the sh/parser.c change should be here. Ignore the others.

jilles edited edge metadata.

OK for the bin/sh/parser.c change.

This revision is now accepted and ready to land.May 3 2016, 9:47 PM
This revision was automatically updated to reflect the committed changes.