Skip to content
Lysander edited this page May 23, 2011 · 6 revisions

BashMate

Bashmate is a beginner firendly Shell Snippet Manager. You can create snippets / templates of Shell commands and store them. You can define arbitrary placeholders inside each command, which can be substituted later by real values.

Take a look at this example template: cp {file} {newfile}

This little snippet will just copy one file to another location. Within BashMate you can now set the real values for the names file and newfile and the tool will substitute them.

Names / Identifiers

You have to name the placeholders by typing a name between the paranthesis! cp {} will not be accepted. cp {a4} will work instead. A valid name is a valid Python identifier. So it must begin with an underscore or a letter, followed by arbitrary elements like letters, digits or even more underscores.

Screenshots

Take a look at these picatures to see how BashMate looks like

BashMate Mainwindow

Fileformat

The templates are stored in a JSON format, that looks like this:

[
    {
        "command": "ls *.{suffix}", 
        "info": "Listet alle Dateien einer Endung {suffix} auf",
        "names": ["suffix"]
    },
    {
        "command": "cp {fpath} {fpath}.{suffix}", 
        "info": "Erstellt ein Backup der Datei {fpath} mit der Endung {suffix}",
        "names": ["fpath", "suffix"]
    }
]
Clone this wiki locally