Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature : Global ignore list (Issue #79) #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pidcat.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import argparse
import sys
import re
import os
import subprocess
from subprocess import PIPE

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down