Condense path so it renders within width terminal cells.
Directory components are replaced by a single ellipsis, growing outward from the middle of the component list, because the tail of a path — the directory or file the user is actually looking at — is the part worth keeping. The last component is only end-truncated once every directory component has already been dropped.
Path to display, already home-substituted where wanted.
Cells available for prefix and the path together.
Text rendered immediately before the path; it is returned as
part of the result and counted against width.