This commit is contained in:
Ryan Kemper 2018-08-08 06:58:29 +00:00 committed by GitHub
commit 65f81d835d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 9 deletions

View File

@ -56,6 +56,7 @@ PATTERNS_LIST=(
"([0-9a-f]{7,40})"
"((https?://|git@|git://|ssh://|ftp://|file:///)[[:alnum:]?=%/_.:,;~@!#$&()*+-]*)"
"([[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3})"
"(deployment.app|binding|componentstatuse|configmap|endpoint|event|limitrange|namespace|node|persistentvolumeclaim|persistentvolume|pod|podtemplate|replicationcontroller|resourcequota|secret|serviceaccount|service|mutatingwebhookconfiguration.admissionregistration.k8s.io|validatingwebhookconfiguration.admissionregistration.k8s.io|customresourcedefinition.apiextension.k8s.io|apiservice.apiregistration.k8s.io|controllerrevision.apps|daemonset.apps|deployment.apps|replicaset.apps|statefulset.apps|tokenreview.authentication.k8s.io|localsubjectaccessreview.authorization.k8s.io|selfsubjectaccessreviews.authorization.k8s.io|selfsubjectrulesreview.authorization.k8s.io|subjectaccessreview.authorization.k8s.io|horizontalpodautoscaler.autoscaling|cronjob.batch|job.batch|certificatesigningrequest.certificates.k8s.io|events.events.k8s.io|daemonset.extensions|deployment.extensions|ingress.extensions|networkpolicies.extensions|podsecuritypolicies.extensions|replicaset.extensions|networkpolicie.networking.k8s.io|poddisruptionbudget.policy|clusterrolebinding.rbac.authorization.k8s.io|clusterrole.rbac.authorization.k8s.io|rolebinding.rbac.authorization.k8s.io|role.rbac.authorization.k8s.io|storageclasse.storage.k8s.io)[[:alnum:]_#$%&+=/@-]+"
)
IFS=$'\n'

View File

@ -102,8 +102,8 @@ BEGIN {
HINTS[98] = "as"
HINTS[99] = "aa"
finger_patterns = ENVIRON["FINGERS_PATTERNS"];
fingers_compact_hints = ENVIRON["FINGERS_COMPACT_HINTS"];
finger_patterns = ENVIRON["FINGERS_PATTERNS"];
fingers_compact_hints = ENVIRON["FINGERS_COMPACT_HINTS"];
if (fingers_compact_hints)
fingers_hint_position = ENVIRON["FINGERS_HINT_POSITION"];
@ -111,14 +111,14 @@ BEGIN {
fingers_hint_position = ENVIRON["FINGERS_HINT_POSITION_NOCOMPACT"];
if (fingers_compact_hints) {
hint_format = ENVIRON["FINGERS_HINT_FORMAT"]
hint_format_nocolor = ENVIRON["FINGERS_HINT_FORMAT_NOCOLOR"]
highlight_format = ENVIRON["FINGERS_HIGHLIGHT_FORMAT"]
hint_format = ENVIRON["FINGERS_HINT_FORMAT"]
hint_format_nocolor = ENVIRON["FINGERS_HINT_FORMAT_NOCOLOR"]
highlight_format = ENVIRON["FINGERS_HIGHLIGHT_FORMAT"]
highlight_format_nocolor = ENVIRON["FINGERS_HIGHLIGHT_FORMAT_NOCOLOR"]
} else {
hint_format = ENVIRON["FINGERS_HINT_FORMAT_NOCOMPACT"]
highlight_format = ENVIRON["FINGERS_HIGHLIGHT_FORMAT_NOCOMPACT"]
hint_format_nocolor = ENVIRON["FINGERS_HINT_FORMAT_NOCOMPACT_NOCOLOR"]
hint_format = ENVIRON["FINGERS_HINT_FORMAT_NOCOMPACT"]
highlight_format = ENVIRON["FINGERS_HIGHLIGHT_FORMAT_NOCOMPACT"]
hint_format_nocolor = ENVIRON["FINGERS_HINT_FORMAT_NOCOMPACT_NOCOLOR"]
highlight_format_nocolor = ENVIRON["FINGERS_HIGHLIGHT_FORMAT_NOCOMPACT_NOCOLOR"]
}
@ -139,7 +139,7 @@ BEGIN {
while (match(line, finger_patterns)) {
pos += RSTART;
col_pos = pos + col_pos_correction
pre_match = substr(output_line, 0, col_pos - 1);
pre_match = substr(output_line, 0, col_pos - 1);
post_match = substr(output_line, col_pos + RLENGTH, length(line) - 1);
line_match = substr(line, RSTART, RLENGTH);