Bug 620408
Summary: | Text might be put in the terminal title instead of the terminal itself | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Tomas Smetana <tsmetana> | |
Component: | setup | Assignee: | Ondrej Vasik <ovasik> | |
Status: | CLOSED ERRATA | QA Contact: | qe-baseos-daemons | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 6.0 | CC: | alex, asersen, azelinka, fnadge, rrakus | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | setup-2.8.14-11.el6 | Doc Type: | Bug Fix | |
Doc Text: |
Bash provides the environment variable, PROMPT_COMMAND, containing a command that is called when a prompt is displayed. Previously, the PROMPT_COMMAND command used two separate echo commands. Consequently, if a background process returned text, the text might have displayed in the X terminal title rather than the terminal itself. In this updated package, the PROMPT_COMMAND command uses a single printf statement rather than two echo commands, ensuring returned text displays in the shell.
|
Story Points: | --- | |
Clone Of: | ||||
: | 620435 620443 (view as bug list) | Environment: | ||
Last Closed: | 2011-05-19 11:54:34 UTC | Type: | --- | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 620443 |
Description
Tomas Smetana
2010-08-02 13:22:22 UTC
I guess we should use `printf' instead of `echo'. PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#HOME/~}"' works for me. Reassigning to setup. Hello, just a small correction: It looks like there is a $ sign missing before HOME. The correct value should look like this: PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"' Please be so kind and add a few key words to the technical note of this bugzilla entry using the following structure: Cause: Consequence: Fix: Result: For details, see: https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes Thanks Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause What actions or circumstances induced the feature request. Consequence What action was inhibited by the feature’s absence. Change What was done to implement the feature. Note: backported from upstream is not an explanation. Result What now happens when the actions or circumstances above occur. Note: this is not the same as the feature request was fulfilled. These are already present in errata description text ... but ok, adding to technotes field. Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,10 +1 @@ -Cause +Under some circumstances (running background process displaying some text), PROMPT_COMMAND environmental variable could cause that the text is shown in the X terminal title, instead of the terminal itself. This was caused by bad design of the PROMPT_COMMAND. Design was improved and single printf was used instead of two separate echo commands, thus preventing the issue.- What actions or circumstances induced the feature request. -Consequence - What action was inhibited by the feature’s absence. -Change - What was done to implement the feature. - Note: backported from upstream is not an explanation. -Result - What now happens when the actions or circumstances above occur. - Note: this is not the same as the feature request was fulfilled. Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1 +1 @@ -Under some circumstances (running background process displaying some text), PROMPT_COMMAND environmental variable could cause that the text is shown in the X terminal title, instead of the terminal itself. This was caused by bad design of the PROMPT_COMMAND. Design was improved and single printf was used instead of two separate echo commands, thus preventing the issue.+Bash provides the environment variable, PROMPT_COMMAND, containing a command that is called when a prompt is displayed. Previously, the PROMPT_COMMAND command used two separate echo commands. Consequently, if a background process returned text, the text might have displayed in the X terminal title rather than the terminal itself. In this updated package, the PROMPT_COMMAND command uses a single printf statement rather than two echo commands, ensuring returned text displays in the shell. *** Bug 705669 has been marked as a duplicate of this bug. *** An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0524.html |