diff --git a/pidcat.py b/pidcat.py index efaa078..7a99b69 100755 --- a/pidcat.py +++ b/pidcat.py @@ -24,6 +24,7 @@ import argparse import sys import re +import os import subprocess from subprocess import PIPE @@ -128,6 +129,8 @@ def indent_wrap(message): 'DEBUG': YELLOW, } +ENV_IGNORED_TAGS = os.getenv('PIDCAT_IGNORED_TAGS',"").split(';') + def allocate_color(tag): # this will allocate a unique format for the given tag # since we dont have very many colors, we always keep track of the LRU @@ -330,7 +333,9 @@ def tag_in_tags_regex(tag, tags): continue if args.tag and not tag_in_tags_regex(tag, args.tag): continue - + if tag_in_tags_regex(tag, ENV_IGNORED_TAGS): + continue + linebuf = '' if args.tag_width > 0: