Insert file title in a query

What I’m trying to do

I’m trying to put current file title in a query like

 query
line: #tag


but i’m not able to change tag with current file title as common references like this.file.title and similar are not processed and great treated like a simple text.

Things I have tried