Skip to content
Snippets Groups Projects
Commit 62dbdaa0 authored by Gerhard Gonter's avatar Gerhard Gonter :speech_balloon:
Browse files

start screen with specific screenrc file, if available

parent 3c6c1b47
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# find or create screen session # find or create screen session
# #
# $Id: SLS,v 1.3 2012/12/14 13:35:38 gonter Exp $ # $Id: SLS,v 1.4 2022/04/15 15:46:06 gonter Exp $
# #
=pod =pod
...@@ -93,12 +93,14 @@ if (@PARS) ...@@ -93,12 +93,14 @@ if (@PARS)
print ">>> $cmd_title\n"; print ">>> $cmd_title\n";
system ($cmd_title) if ($doit); system ($cmd_title) if ($doit);
my $cmd_screen= "screen -S '$wanted'"; my @cmd_screen= ('screen', '-S', $wanted);
print ">>> $cmd_screen\n"; my $rc_wanted= ".screenrc-$wanted";
push (@cmd_screen, '-c', $rc_wanted) if (-f $rc_wanted);
print ">>> ", join(' ', @cmd_screen), "\n";
if ($doit) if ($doit)
{ {
if (!$dir_changed && $wanted =~ /notes/i) { &chdir ("common/Notes"); $dir_changed= 1; } if (!$dir_changed && $wanted =~ /notes/i) { &chdir ("common/Notes"); $dir_changed= 1; }
system ($cmd_screen); system (@cmd_screen);
} }
} }
elsif ($cnt == 1) elsif ($cnt == 1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment