mirror of
https://github.com/gryf/tabbedalt.git
synced 2025-12-17 19:40:31 +01:00
Session: removed one unnecessary grep from check
Currently, there was a command used: ps x|grep " urxvt "|grep -v grep|wc -l which was checking if there is only one instance of urxvt during start, so that it will be possible to initialize session. The `grep -v grep` is in excess. This patch is fixing that.
This commit is contained in:
2
tabbed
2
tabbed
@@ -445,7 +445,7 @@ sub on_start {
|
||||
|
||||
# Ugly as hell ``session'' implementation
|
||||
my $count = 0;
|
||||
if (qx(ps x|grep " urxvt "|grep -v grep|wc -l) < 2 && scalar(@{$self->{session}})){
|
||||
if (qx(ps x|grep "[ ]urxvt "|wc -l) < 2 && scalar(@{$self->{session}})){
|
||||
for my $item (@{$self->{session}}){
|
||||
if (exists($self->{tabcmds}{uc($item)})){
|
||||
$self->new_tab(@{$self->{tabcmds}{uc($item)}});
|
||||
|
||||
Reference in New Issue
Block a user