Bug 136264 - add PREEXEC_COMMAND variable to bash?
Summary: add PREEXEC_COMMAND variable to bash?
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL: http://progn.org/scripts.shtml
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-10-18 23:36 UTC by Paul Bolle
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-10-19 08:20:49 UTC
Type: ---
Embargoed:


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

Description Paul Bolle 2004-10-18 23:36:52 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20040922

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):
2.05b-38

Comment 1 Paul Bolle 2004-10-18 23:39:56 UTC
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 23:42:45 UTC
Hmmm ... it seems I edited the headers not too well. At least rpmbuild
didn't mind!

Comment 3 Tim Waugh 2004-10-19 08:20:49 UTC
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.