-
-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
I would like to be able to pipe a string of clojure code into my command without the shell expanding it. In python when you fork a process you can create a pipe, and feed that pipe data which is in turn piped into whatever command you are running. This bypasses shell expansion completely for special characters. Per a conversation on slack here is a theoretical config for a tool:
{
"customTools": {
"example-pipe-command": {
"description": "A command that needs it's input piped.",
"pipe-param": "code",
"command": "clj-nrepl-eval -p {{port}}",
"schema": {
"code": {
"type": "string",
"description": "Code string is piped to the command."
},
"port": {
"type": "string",
"description": "Specify repl port."
}
},
"required": ["code", "port"]
}
}
}
This would expand into something like echo {{code}} | clj-nrepl-eval -p 9000
You would have to pipe it in directly instead of using echo and the pipe symbol in the command since that would cause the shell to expand the string before it is piped.
Metadata
Metadata
Assignees
Labels
No labels