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