bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: enhancement: PROMPT_COMMAND_AFTER


From: me
Subject: Re: enhancement: PROMPT_COMMAND_AFTER
Date: Wed, 13 Mar 2002 03:18:34 -0500

 Thanks Paul for the tip.

 I'm glad it's a common request; are there any patches floating around
for an actual enhancement/fix, rather than a workaround witch affects
other functionalities of bash ?

   Thx,

     John

Paul Jarc wrote:
> 
> me <bad@email.com> wrote:
> >   Is there currently another way to accomplish this ? (run a cmd before
> > the new cmdline is launched)
> 
> This is a common request.  It can almost be done with a script:
> #!/bin/bash -i
> while :; do
>   eval "$PROMPT_COMMAND"
>   read -ep "$PS1" line || break
>   eval "$PROMPT_COMMAND_AFTER"
>   eval "$line"
> done
> 
> But then you don't get multi-line commands, $ substitution in PS1,
> etc.
> 
> paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]