Not from within the command line, no. The command line only accepts raw text and sends exactly what you type in.
You can create an alias, however, that can reference the variables you need.
For example, you could do something like:
Syntax: ^punch(?: (.+))?$
Script:
if matches[2] then
send(matches[1])
else
send(string.format("punch %s",tar))
end
Which would change depending on how you use it. You could save your target as "vadi", for example, and just type in "punch" to make it punch vadi. But if you wanted to punch me instead without changing your target you could type in "punch tsuujin" and it would bypass needing the second argument and use the variable instead.
This is an absurd example, because you could do the exact same thing by just using:
Syntax: ^punch$
Script:
send(string.format("punch %s",tar))
and it would still work exactly the same way, but it's still a good example of why aliases are cool and flexible. That said, I have used this technique heavily before if I always want to do some sort of script whenever the punch command is sent other than just punching.