Fix 'autoclose' functionality

Logic wasn't right when defined in the config file and also when used on the command line.
This commit is contained in:
Duncan Ferguson 2011-12-15 11:23:28 +00:00
parent b41907bcc4
commit a8e68a461b
3 changed files with 6 additions and 3 deletions

View file

@ -1,3 +1,6 @@
????-??-?? Duncan Ferguson <duncan_ferguson@user.sf.net> - v4.01_02
* Fix logic when using 'autoclose' on the command line or config file
2011-12-09 Duncan Ferguson <duncan_ferguson@user.sf.net> - v4.01_01
* Include missing files from release tarballs

View file

@ -3,7 +3,7 @@ package App::ClusterSSH;
use 5.008.004;
use warnings;
use strict;
use version; our $VERSION = version->new('4.01_01');
use version; our $VERSION = version->new('4.01_02');
use Carp;
@ -1802,7 +1802,7 @@ sub run {
$self->config->{auto_quit} = "yes" if $options{autoquit};
$self->config->{auto_quit} = "no" if $options{'no-autoquit'};
$self->config->{auto_close} = $options{autoclose} if $options{'autoclose'};
$self->config->{auto_close} = $options{autoclose} if defined $options{'autoclose'};
$self->config->{window_tiling} = "yes" if $options{tile};
$self->config->{window_tiling} = "no" if $options{'no-tile'};

View file

@ -27,7 +27,7 @@ sub script {
my $command = $config->{command};
my $autoclose = $config->{auto_close};
my $postcommand = $autoclose ? "echo Press RETURN to continue; read IGNORE" : "sleep $autoclose";
my $postcommand = $autoclose ? "sleep $autoclose" : "echo Press RETURN to continue; read IGNORE"; # : "sleep $autoclose";
# # P = pipe file
# # s = server