Context: I have a window split into three panes. The top pane is running a script which shows my mercurial status by occasionally running 'hg xl'. My script knows how many lines are output by the command.
Is there a way I can have this program resize its pane to be exactly the right number of lines for this output?