Override font used on command line

Add an option -f or --font to the cssh command to allow for overriding the terminal_font setting from the config file at runtime.
This commit is contained in:
Duncan Ferguson 2010-06-18 23:32:27 +01:00
parent 9834440176
commit f379208b32
4 changed files with 11 additions and 2 deletions

View file

@ -1,6 +1,8 @@
????-??-?? Duncan Ferguson <duncan_ferguson@user.sf.net> - v4.00_02 ????-??-?? Duncan Ferguson <duncan_ferguson@user.sf.net> - v4.00_02
* Add in bugtracker and homepage resources to Build.PL file * Add in bugtracker and homepage resources to Build.PL file
* Bring new module App::ClusterSSH::Host into play for parsing host strings
* Patch to override font used on command line (Roland Rosenfeld)
2010-01-08 Duncan Ferguson <duncan_ferguson@user.sf.net> - v4.00_01 2010-01-08 Duncan Ferguson <duncan_ferguson@user.sf.net> - v4.00_01

3
THANKS
View file

@ -33,5 +33,4 @@ Sami Kerola
Kristian Lyngstol Kristian Lyngstol
Mike Loseke Mike Loseke
Ian Marsh Ian Marsh
Roland Rosenfeld
$Id$

View file

@ -202,6 +202,10 @@ repeated multiple times. Maximum level is 4.
Display and evaluate the terminal and connection arguments so display any Display and evaluate the terminal and connection arguments so display any
potential errors. The <hostname> is required to aid the evaluation. potential errors. The <hostname> is required to aid the evaluation.
=item --font,-u "5x8"
Specify the font to use in the terminal windows. Use standard X font notation.
=item --tile,-g|--no-tile,-G =item --tile,-g|--no-tile,-G
Enable|Disable window tiling (overriding the config file) Enable|Disable window tiling (overriding the config file)

View file

@ -86,6 +86,7 @@ my @options_spec = (
'term-args|t=s', 'term-args|t=s',
'title|T=s', 'title|T=s',
'output-config|u', 'output-config|u',
'font|f=s',
); );
my %options; my %options;
my %config; my %config;
@ -373,6 +374,9 @@ sub check_config() {
} }
$config{internal_previous_state} = ""; # set to default $config{internal_previous_state} = ""; # set to default
# option font overrides config file font setting
config{terminal_font} = $options{font} if ( $options{font} );
get_font_size(); get_font_size();
$config{extra_cluster_file} =~ s/\s+//g; $config{extra_cluster_file} =~ s/\s+//g;