Bug 2277426
| Summary: | vte.sh notifications broken when PROMPT_COMMAND is an array | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Christian Hergert <chergert> | ||||
| Component: | vte291 | Assignee: | David King <amigadave> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 40 | CC: | amigadave, chpe, gnome-sig, klember | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | vte291-0.76.1-1.fc40 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2024-05-07 05:14:32 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: | |||||||
| Attachments: |
|
||||||
|
Description
Christian Hergert
2024-04-26 20:56:12 UTC
Note that for me, a fedora 39 container works fine, but a fedora 40 container does not. This seems to make things work for me, though I have no idea what the side-effects are at the moment with regards to titles/cwd/etc.
diff --git a/vte.sh b/vte.sh.new
index 4c85d28..1b7d536 100644
--- a/vte.sh
+++ b/vte.sh.new
@@ -51,7 +51,7 @@ if [[ -n "${BASH_VERSION:-}" ]]; then
# use the __vte_prompt_command function which also sets the title.
if [[ "$(declare -p PROMPT_COMMAND 2>&1)" =~ "declare -a" ]]; then
- PROMPT_COMMAND+=(__vte_osc7) && PS0=$(printf "\033]777;preexec\033\\")
+ PROMPT_COMMAND+=(__vte_prompt_command) && PS0=$(printf "\033]777;preexec\033\\")
else
PROMPT_COMMAND="__vte_prompt_command" && PS0=$(printf "\033]777;preexec\033\\")
fi
Created attachment 2030126 [details]
Fixes handling of notify and shell-precmd with Bash PROMPT_COMMAND array
This can be copied into the patch for the RPM spec but it is also updated in the combined patch which was taken for Ptyxis for F40.
Now that F40 is using Bash arrays for $PROMPT_COMMAND it broke the vte.sh patches. This should make those code-paths also handled when an array.
FEDORA-2024-ce96ecae8c (vte291-0.76.1-1.fc40) has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2024-ce96ecae8c Just noting that the vte291-0.76.1-1 does not yet have the updated patch for PROMPT_COMMAND. FEDORA-2024-ce96ecae8c has been pushed to the Fedora 40 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-ce96ecae8c` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-ce96ecae8c See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2024-ce96ecae8c (vte291-0.76.1-1.fc40) has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report. Just confirming that this does indeed seem to fix things. |