Bug 136264 - add PREEXEC_COMMAND variable to bash?
add PREEXEC_COMMAND variable to bash?
Product: Fedora
Classification: Fedora
Component: bash (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2004-10-18 19:36 EDT by Paul Bolle
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-19 04:20:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Rene van Beveren's patch (4.59 KB, text/plain)
2004-10-18 19:39 EDT, Paul Bolle
no flags Details

  None (edit)
Description Paul Bolle 2004-10-18 19:36:52 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)

Description of problem:
At the url you'll find some info in German on a patch against
bash-2.05b (written by Rene van Bevern) which enables a
PREEXEC_COMMAND. The "value" of this variable "is executed as a
command prior to executing entered commands in interactive mode". (zsh
seems to have a preexec function for that.) It also introduces the CMD
variable which is "set before a command is run, each array field
corresponds to one  argument  of the command line. It is intended to
be used in PREEXEC_COMMAND scripts."

Together these variables make it possible to set the title of an xterm
(such as gnome-terminal) to the name of the current job! AFAIK this
cannot be done by using PROMPT_COMMAND. This of course makes it much
easier to see what your xterm(s) is (are) doing and choose the right
xterm from you panel.

The patch "builds" cleany against bash-2.05b-38. I haven't examined
the patch very thoroughly (but at first glance I did not spot anything
suspicious). I'll attach it right away ...

Question: should I ask the maintainers upstreams what they think of
this patch?

Version-Release number of selected component (if applicable):
Comment 1 Paul Bolle 2004-10-18 19:39:56 EDT
Created attachment 105405 [details]
Rene van Beveren's patch

Note that I edited the patch slightly (only in the diff "headers") so that I
could use it as a patch "against" (the source found in) bash-2.05b-38.src.rpm.
Comment 2 Paul Bolle 2004-10-18 19:42:45 EDT
Hmmm ... it seems I edited the headers not too well. At least rpmbuild
didn't mind!
Comment 3 Tim Waugh 2004-10-19 04:20:49 EDT
Thanks for the suggestion.

I think this is the sort of thing you'll need to talk to the upstream
maintainer (Chet Ramey) about.  You'll need to add documentation to
the info pages etc.

Note You need to log in before you can comment on or make changes to this bug.