#Issue with Parameter Parsing in Workflows When Original Command Contains {{}}

3 messages · Page 1 of 1 (latest)

torpid jacinthBOT
#

Hi @untold mango. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

It seems like you're having trouble with parameter parsing in workflows when the original command contains {{}}. This is a known issue with Warp's workflow feature.

In Warp, the {{}} double curly brackets are used to specify arguments in workflows and command blocks. When you use {{}} in your command, Warp interprets it as an argument placeholder, which can cause conflicts when the command itself contains {{}}, such as in Docker commands.

There are a few workarounds suggested by the community:

  1. You can remove the period in front of the arg names to be able to save the workflow. If you want to keep the period before the argument, put it outside of the {{}} double curly brackets and it should work as well. For example, your command would look like this: docker ps --format ".{{Names}}\t.{{RunningFor}}\t.{{Ports}}\t.{{Image}}" (source (https://github.com/warpdotdev/Warp/issues/3247)).

  2. Another user suggested using a detour and entering DOCKER_TEMPLATE=$(echo '{{ json .Mounts }}') in the Linux shell, then using the following syntax in the workflow: docker inspect --format "$DOCKER_TEMPLATE" {{DOCKER_IMAGE}} | python3 -m json.tool (source (https://github.com/warpdotdev/Warp/issues/3352)).

  3. There's also a feature request to allow escaping of {{}} in workflows, which would solve this issue. The proposed solution is to use triple curly brackets {{{}}} to escape the mustache syntax (source (https://github.com/warpdotdev/Warp/issues/3352)).

#

Please note that these are workarounds and the issue is still open. You can track the progress and contribute to the discussion on the Warp GitHub page (https://github.com/warpdotdev/Warp/issues).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: