Summary: | app-misc/mc: In subshell mode, it is not understood that PROMPT_COMMAND may be an array | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | kfm |
Component: | Current packages | Assignee: | Marek Szuba <marecki> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | kfm, sam |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=550104 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | mc-4.8.31-clear-PROMPT_COMMAND.patch |
Description
kfm
2024-04-22 00:52:07 UTC
Created attachment 891294 [details, diff]
mc-4.8.31-clear-PROMPT_COMMAND.patch
To comment further, upstream ought to be doing something like this: if eval '[[ ${PROMPT_COMMAND@a} == *a* ]]' 2>/dev/null; then PROMPT_COMMAND+=('mc crap goes here') else PROMPT_COMMAND+=';mc crap goes here' fi I maintain that the attached patch is likely the better solution for Gentoo, however. There are times at which I wish I could edit comments. Rather, upstream could fix it from their perspective by doing something like: if eval '[[ ${PROMPT_COMMAND@a} == *a* ]]' 2>/dev/null; then PROMPT_COMMAND+=('mc crap goes here') else PROMPT_COMMAND+=${PROMPT_COMMAND+$PROMPT_COMMAND$'\n'}'mc crap goes here' fi |