Compare commits

...

4 Commits

Author SHA1 Message Date
Jacob Menashe a1fec111a1
Merge a5ef099539 into 572618395c 2024-03-28 14:09:06 -03:00
Radovan Garabík 572618395c
Merge pull request #235 from scratchyone/patch-1
Fix grc.fish argument handling bug
2024-03-21 17:18:45 +02:00
scratchyone c7fc72d248
Update grc.fish 2024-03-05 16:23:23 -05:00
Jake Menashe a5ef099539 Modified pattern coloring process to apply coloring in an order consistent with configured color lists and regex groups. 2022-06-06 08:51:07 -07:00
2 changed files with 3 additions and 6 deletions

View File

@ -19,7 +19,7 @@ for executable in $grc_plugin_execs
if isatty 1
grc $executable $argv
else
eval command $executable $argv
eval command $executable "$argv"
end
end
end

7
grcat
View File

@ -101,11 +101,8 @@ for c in range(0, 256):
signal.signal(signal.SIGINT, signal.SIG_IGN)
def add2list(clist, m, patterncolour):
for group in range(0, len(m.groups()) +1):
if group < len(patterncolour):
clist.append((m.start(group), m.end(group), patterncolour[group]))
else:
clist.append((m.start(group), m.end(group), patterncolour[0]))
for group in range(len(m.groups())):
clist.append((m.start(group+1), m.end(group+1), patterncolour[group]))
def get_colour(x):
if x in colours: