diff options
| author | Keith Packard <keithp@keithp.com> | 2011-04-01 14:07:23 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2011-04-01 14:07:23 -0700 | 
| commit | 01952da35a57ae4da062facb26b3c6d7de29190f (patch) | |
| tree | 55fe738ea7be35faaadbec93a80bcd41e5513d43 /src/ao_cmd.c | |
| parent | 359ba0d9fc2c5947e6adc98bebcd061069c61e79 (diff) | |
altos: Provide for a pre-filter on commands
This allows for external code to see each command line before it is
processed and potentially skip it.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_cmd.c')
| -rw-r--r-- | src/ao_cmd.c | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/src/ao_cmd.c b/src/ao_cmd.c index 6007773c..50d5b96f 100644 --- a/src/ao_cmd.c +++ b/src/ao_cmd.c @@ -275,6 +275,11 @@ ao_cmd(void)  	lex_echo = 1;  	for (;;) {  		readline(); +#if HAS_CMD_FILTER +		if (ao_cmd_filter()) +			continue; +		cmd_i = 0; +#endif  		ao_cmd_lex();  		ao_cmd_white();  		c = ao_cmd_lex_c; | 
