diff --git a/aql2/src/prompt/ReadlinePromptCompletion.cpp b/aql2/src/prompt/ReadlinePromptCompletion.cpp
index a9c3d08d1ecb183db7e93d7c64014c6b1f67a0e1..c722814299e61884bac682ea46a21ba1e03685b4 100644
--- a/aql2/src/prompt/ReadlinePromptCompletion.cpp
+++ b/aql2/src/prompt/ReadlinePromptCompletion.cpp
@@ -72,6 +72,9 @@ ReadlinePromptCompletion::CompletionContext ReadlinePromptCompletion::context (
 	if ( p >= rl_line_buffer && ( *p == '<' || *p == '>' ) )
 		return CompletionContext::FILEPATH_OR_VARIABLE;
 
+	if ( p >= rl_line_buffer && ( *p == '|' || *p == '(' ) )
+		return CompletionContext::ALGORITHM;
+
 	if ( startswith ( line, "execute" ) && start == 8 )
 		return CompletionContext::ALGORITHM;