match_max

term

programmingnetworking

Kept in this browser · My desk

The Expect setting that sizes the buffer an expect command matches against, 2000 characters by default, past which the oldest output is forgotten.

match_max sets it for the current spawn id and match_max -d for those spawned later. The full_buffer keyword is the pattern that fires when output is about to be forgotten, and the forgotten text lands in expect_out(buffer) either way. In Expect 5.45.4 the buffer holds three times match_max and drops its oldest third when two thirds full, so a long answer can lose its beginning without a sign; a script that needs a long answer whole raises match_max before it sends the command.

Also known as: full_buffer, match_max -d

← Back to M Back to the glossary