Move auto close and show history option processing into module

This commit is contained in:
Duncan Ferguson 2014-06-27 18:17:22 +01:00
parent 3416ab1288
commit dbfa2733fd
2 changed files with 7 additions and 4 deletions

View file

@ -1885,7 +1885,7 @@ sub run {
$self->getopts;
warn "THROUGH";
warn "GETOPTS work in progress";
#die;
### main ###
@ -1906,7 +1906,6 @@ sub run {
$self->config->{window_tiling} = "yes" if $options{tile};
$self->config->{window_tiling} = "no" if $options{'no-tile'};
$self->config->{show_history} = 1 if $options{'show-history'};
$self->config->{ssh_args} = $options{options} if ( $options{options} );
$self->config->{terminal_args} = $options{'term-args'}
@ -1919,7 +1918,7 @@ sub run {
$self->config->dump() if ( $self->options->dump_config);
$self->evaluate_commands() if ( $options{evaluate} );
$self->evaluate_commands() if ( $self->options->evaluate );
$self->get_font_size();
@ -1936,7 +1935,7 @@ sub run {
$self->cluster->get_tag_entries( split /,/,
$self->config->{extra_tag_file} || '' );
if ( $options{'list'} ) {
if ( $self->options->list ) {
print( 'Available cluster tags:', $/ );
print "\t", $_, $/ foreach ( sort( $self->cluster->list_tags ) );

View file

@ -284,6 +284,10 @@ sub getopts {
$self->parent->config->{terminal_font} = $self->font if ($self->font);
$self->parent->config->{terminal_args} = $self->term_args if ($self->term_args);
$self->parent->config->{show_history} = 1 if($self->show_history);
$self->parent->config->{auto_close} = $self->autoclose if($self->autoclose);
return $self;
}