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
Unknown Object (File)
Tue, Sep 22, 3:32 AM
Unknown Object (File)
Mon, Sep 21, 8:57 AM
Unknown Object (File)
Mon, Sep 21, 8:32 AM
Unknown Object (File)
Mon, Sep 21, 8:28 AM
Unknown Object (File)
Sun, Sep 20, 7:26 PM
Unknown Object (File)
Sun, Sep 20, 6:51 PM
Unknown Object (File)
Sun, Sep 20, 4:53 PM
Unknown Object (File)
Sat, Sep 19, 10:52 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.