Compare commits

...

6 Commits

Author SHA1 Message Date
Jacob Menashe 1ad25af01b
Merge a5ef099539 into d324edd803 2024-02-26 19:16:58 -08:00
Radovan Garabík d324edd803
Merge pull request #212 from pemensik/ls-locales
Fix ls colors also for French
2024-02-25 17:08:23 +01:00
Radovan Garabík 2c48356775
Merge pull request #187 from StayPirate/patch-1
Remove duplicated word
2024-02-25 17:00:29 +01: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
Petr Menšík fb349233b4 Fix ls colors also for French
French locale has visible difference, which fails even after the last change.

Example:
fr_FR: 21 févr. 17:24

Allow up to 5 letters on month and accept also dot at the end of month
name. Do that only for one direction. Extend spaces matching after date.

Signed-off-by: Petr Menšík <pemensik@redhat.com>
2022-03-17 13:24:23 +01:00
Gianluca Gabrielli 6965c30625
Remove duplicated word 2021-08-06 13:39:20 +02:00
3 changed files with 4 additions and 7 deletions

View File

@ -104,7 +104,7 @@ To facilitate the use, command `grc` acts as frontend for `grcat`, automatically
etc...
`grc` will execute command command with optional parameters piping its stdout into `grcat`.
`grc` will execute command with optional parameters piping its stdout into `grcat`.
Configuration file for `grcat` is determined by `/etc/grc.conf` or `~/.grc/grc.conf` file.

View File

@ -35,7 +35,7 @@ regexp=\s(\d+),\s+(\d+)\s
colours=default,bright_yellow ,yellow
=======
# Date-Time => G1=Month G2=Day G3=Hour G4=Minutes G5=Year
regexp=(?:(\w{2,3})\s([ 1-3]\d)|([ 1-3]\d\.?)\s(\w{2,3}))\s(?:([0-2]?\d)[\.:]([0-5]\d)(?=[\s,]|$)|\s*(\d{4}))
regexp=(?:(\w{2,5})\s([ 1-3]\d)|([ 1-3]\d\.?)\s(\w{2,5}\.?))\s{1,3}(?:([0-2]?\d)[\.:]([0-5]\d)(?=[\s,]|$)|(\d{4}))
colours=unchanged,cyan,cyan,cyan,cyan,cyan,cyan,bold magenta
=======
# root

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: