stackrc breaks command prompt

Bug #1673459 reported by Jiří Stránský
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
James Slagle

Bug Description

The new PROMPT_COMMAND overriding breaks bash command prompt. When navigating with C-p and then C-n (or up arrow, then down arrow) in command history, the prompt and printed commands get garbled together.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to instack-undercloud (master)

Fix proposed to branch: master
Review: https://review.openstack.org/446519

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/450893

Changed in tripleo:
assignee: Jiří Stránský (jistr) → James Slagle (james-slagle)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)

Fix proposed to branch: master
Review: https://review.openstack.org/450899

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on instack-undercloud (master)

Change abandoned by Jiri Stransky (<email address hidden>) on branch: master
Review: https://review.openstack.org/446519
Reason: We're going with Iae1d0e942475ebace38c2afd24b08cece14c931d

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to instack-undercloud (master)

Reviewed: https://review.openstack.org/450893
Committed: https://git.openstack.org/cgit/openstack/instack-undercloud/commit/?id=9373ca5c2149042a9aeedf8c99450deb50c0ce56
Submitter: Jenkins
Branch: master

commit 9373ca5c2149042a9aeedf8c99450deb50c0ce56
Author: James Slagle <email address hidden>
Date: Tue Mar 28 13:06:41 2017 -0400

    Fix broken command prompt

    Interactive editing of the command line was broken due to the usage of
    $PROMPT_COMMAND. The cursor would often be placed at the wrong location
    when editing history due to prompt length confusion. We already had the
    OS_CLOUDNAME variable for this purpose, and I took the prompt setting
    logic from what we previously used in tripleo-incubator:

    http://git.openstack.org/cgit/openstack/tripleo-incubator/tree/cloudprompt

    A previous attempt to fix this bug is in
    I55b8a9222fc53f33371bae0baa3c0e93340672b9
    but it seems there is some disagreement on the approach.

    Change-Id: Iae1d0e942475ebace38c2afd24b08cece14c931d
    Partial-Bug: #1673459

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.openstack.org/450899
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=2d376f13674bf899cbe9b32d71cd7ecdfb1219e5
Submitter: Jenkins
Branch: master

commit 2d376f13674bf899cbe9b32d71cd7ecdfb1219e5
Author: James Slagle <email address hidden>
Date: Tue Mar 28 13:15:33 2017 -0400

    Fix broken command prompt

    Interactive editing of the command line was broken due to the usage of
    $PROMPT_COMMAND. The cursor would often be placed at the wrong location
    when editing history due to prompt length confusion. We already had the
    OS_CLOUDNAME variable for this purpose, and I took the prompt setting
    logic from what we previously used in tripleo-incubator:

    http://git.openstack.org/cgit/openstack/tripleo-incubator/tree/cloudprompt

    Change-Id: I85d6a2be597477ff74ba72ffa4c4aefc42c0df3c
    Partial-Bug: #1673459

Changed in tripleo:
milestone: pike-1 → pike-2
Revision history for this message
Jiří Stránský (jistr) wrote :

IIUC James' patch fixed this, i'm closing the bug.

Changed in tripleo:
status: In Progress → Fix Committed
Changed in tripleo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.