randy3k / Terminus

Bring a real terminal to Sublime Text
https://packagecontrol.io/packages/Terminus
MIT License
1.39k stars 81 forks source link

can't use echo 'sometext' >> myfile.txt #149

Open 11grossmane opened 5 years ago

11grossmane commented 5 years ago

I want to create custom command that adds an index.html file to the folder, and then adds a src to it. The command works if I use it just to create the index.html file, but as soon as I add the echo command it neither adds the desired text nor creates the index.html file. Here is the code:

{
    //create index.html file in this folder and add src
    "keys": ["ctrl+alt+h"],
    "command": "terminus_open",
    "args":
    {
        "cwd": "${file_path:${folder}}",
        "cmd": ["touch", "index.html"],
        "cmd": ["echo", "'<script src='$file'></script>'", ">>", "index.html"],
        "auto_close": true
    },

},