diff --git a/plugins/sh/resources/META-INF/plugin.xml b/plugins/sh/resources/META-INF/plugin.xml
index fa97dc02c2e9..4dfa055ad25d 100644
--- a/plugins/sh/resources/META-INF/plugin.xml
+++ b/plugins/sh/resources/META-INF/plugin.xml
@@ -27,6 +27,8 @@ Adds support for working with shell script files
+
diff --git a/plugins/sh/src/com/intellij/sh/codeInsight/ShTargetElementEvaluator.java b/plugins/sh/src/com/intellij/sh/codeInsight/ShTargetElementEvaluator.java
new file mode 100644
index 000000000000..a31807adb09a
--- /dev/null
+++ b/plugins/sh/src/com/intellij/sh/codeInsight/ShTargetElementEvaluator.java
@@ -0,0 +1,14 @@
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+package com.intellij.sh.codeInsight;
+
+import com.intellij.codeInsight.TargetElementEvaluatorEx2;
+import com.intellij.psi.PsiElement;
+import com.intellij.sh.psi.ShFunctionDefinition;
+import org.jetbrains.annotations.NotNull;
+
+public class ShTargetElementEvaluator extends TargetElementEvaluatorEx2 {
+ @Override
+ public boolean isAcceptableNamedParent(@NotNull PsiElement parent) {
+ return parent instanceof ShFunctionDefinition;
+ }
+}