#!/usr/bin/perl# Implement a 'toggle' command that toggles reverse video on and offsubon_action{my($self,$cmd)=@_;if($cmdeq"toggle"){my$e=$self->{enabled};my$act=$e?"l":"h";$self->{enabled}=not$e;$self->cmd_parse("\033[?5".$act)}}subon_start{my($self)=@_;$self->{enabled}=0;}