Browse Source

Avoid grep ambiguities

Where regular expression is read from a variable and -e argument is not
provided, the resulting call may end up being interpreted as grep
argument.

See also:

    https://github.com/koalaman/shellcheck/issues/1342
Alois Mahdal 6 years ago
parent
commit
c483b1e13f
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/imapdomo.skel

+ 1
- 1
src/imapdomo.skel View File

@@ -112,7 +112,7 @@ handle() {
112 112
     # Handle action $Action
113 113
     #
114 114
     local cmd       # imapfilter command
115
-    lshandlers | grep -qw "$Action" || {
115
+    lshandlers | grep -qwe "$Action" || {
116 116
         warn "no handler for action: $Action.lua in $CfgDir/handlers"
117 117
         return 2
118 118
     }