match whole words in commands
If e.g. you have a AUTO_NOTIFY_WHITELIST=d, notify on "d" but not on "diff".
This commit is contained in:
parent
22b2c61ed1
commit
0d6e4e016d
1 changed files with 2 additions and 2 deletions
|
@ -89,7 +89,7 @@ function _is_auto_notify_ignored() {
|
||||||
|
|
||||||
if [[ -n "$AUTO_NOTIFY_WHITELIST" ]]; then
|
if [[ -n "$AUTO_NOTIFY_WHITELIST" ]]; then
|
||||||
for allowed in $AUTO_NOTIFY_WHITELIST; do
|
for allowed in $AUTO_NOTIFY_WHITELIST; do
|
||||||
if [[ "$target_command" == "$allowed"* ]]; then
|
if [[ "$target_command" == "$allowed"(| *) ]]; then
|
||||||
print "no"
|
print "no"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
@ -97,7 +97,7 @@ function _is_auto_notify_ignored() {
|
||||||
print "yes"
|
print "yes"
|
||||||
else
|
else
|
||||||
for ignore in $AUTO_NOTIFY_IGNORE; do
|
for ignore in $AUTO_NOTIFY_IGNORE; do
|
||||||
if [[ "$target_command" == "$ignore"* ]]; then
|
if [[ "$target_command" == "$ignore"*(| *) ]]; then
|
||||||
print "yes"
|
print "yes"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue