Ver código fonte

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 anos atrás
pai
commit
c483b1e13f
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1
    1
      src/imapdomo.skel

+ 1
- 1
src/imapdomo.skel Ver arquivo

@@ -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
     }