~/snippets/cpn-eval-stored-command
Published on

Evaluate a stored command

127 words1 min read
$ copy-paste-notes list --format json | jq -r '.[] | select(.title == "echo test")'
{
  "id": 6,
  "title": "echo test",
  "description": "echo \"Hello World\"",
  "createTimestamp": "2023-08-17 13:24:16"
}

$ eval $(copy-paste-notes get --title "echo test" -f json | jq -r '.description')
Hello World