WAD PRE_EXEC executed before PROMPT2

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

rconn

Administrator
Staff member
May 14, 2008
10,096
85
#2
WAD.

PRE_EXEC is executed after the original line has been entered. The parser subsequently determines (much later) that the line is incomplete, and prompts for the remainder. If PRE_EXEC were delayed until the line continuation, it would break a LOT of existing functionality (including aliases). And it would require a significant parser rewrite -- for AFAICT no discernible benefit.
 
#5
WAD.

PRE_EXEC is executed after the original line has been entered. The parser subsequently determines (much later) that the line is incomplete, and prompts for the remainder. If PRE_EXEC were delayed until the line continuation, it would break a LOT of existing functionality (including aliases). And it would require a significant parser rewrite -- for AFAICT no discernible benefit.
I'm surprised that you can't move the test that triggers the execution of PRE_EXEC to one (or more) more appropriate locations (namely, just before execution of the command).

Maybe its name should be changed (to, say, POST_ENTER), and its description changed to better reflect what it does.