Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: postcmd?



On Wed, Sep 08, 1999 at 11:30:13AM +0100,
Adam Spiers <adam@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> 
> Is it possible to get code executed after you've hit enter, but
> /before/ any output appears, i.e. is there some sort of parallel of
> precmd?  If so, whack me with the relevant bit of the manual that I
> missed.  If not, consider this a feature request :-)

That's what the preexec function is for. Try this:
preexec () {
  echo "About to execute $1"
}

> Adam

CU,

Thomas

-- 
    Thomas Köhler    Email:     jean-luc@xxxxxxxxxxxxxxxxx
        <><           WWW:    http://home.pages.de/~jeanluc/
                      IRC:               jeanluc
      LCARS --- Linux for Computers on All Real Starships



Messages sorted by: Reverse Date, Date, Thread, Author