New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 626210 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

infra/go bootstrap PS1 emission breaks prompts that contain newlines.

Project Member Reported by d...@chromium.org, Jul 7 2016

Issue description

See subject. Prospective fix: https://codereview.chromium.org/2121653002
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra.git/+/665cd3ab5c23babeaec3594a98a72c0e37b86fad

commit 665cd3ab5c23babeaec3594a98a72c0e37b86fad
Author: dnj <dnj@chromium.org>
Date: Thu Jul 07 17:42:25 2016

Fix prompt exporting escaped characters, opt into PS1 mod.

Shells (bash, zsh at least) fail to interpret escaped characters, notably
newline, when evaluating a script via "eval". This means that PS1 prompt
augmentation will break promps containing newlines.

This can be solved by exporting the escaped literals of those escape
characters and using the export FOO=$'...' notation, causing the prompt
to acknowledge and interpret those characters when it evaluates them. This
patch does this for commonly-encountered escaped characters.

BUG= chromium:626210 
TEST=local
  - Ran without fix, mangles prompt. Ran with fix, doesn't.

Review-Url: https://codereview.chromium.org/2121653002

[modify] https://crrev.com/665cd3ab5c23babeaec3594a98a72c0e37b86fad/go/README.md
[modify] https://crrev.com/665cd3ab5c23babeaec3594a98a72c0e37b86fad/go/bootstrap.py
[modify] https://crrev.com/665cd3ab5c23babeaec3594a98a72c0e37b86fad/go/env.py

Comment 2 by d...@chromium.org, Jul 7 2016

Status: Fixed (was: Untriaged)

Sign in to add a comment