An open API service indexing awesome lists of open source software.

https://github.com/hernancerm/zmasseur

Massage files.
https://github.com/hernancerm/zmasseur

build zsh

Last synced: 2 months ago
JSON representation

Massage files.

Awesome Lists containing this project

README

          

# zmasseur

Massage files using Zsh. "Massaging" means processing annotations.

Annotations are meant to **modify** a file and are lines beginning with: `#@`.

## Usage

The file to be massaged is "main.zsh":

`main.zsh`

```sh
#@shebang
#@executable

#@expand ./lib.zsh

smile
````

The file "main.zsh" uses the function from this file:

`lib.zsh`

```sh
function smile {
echo 'c:'
}
```

Massage "main.zsh" into the new file "smile" with: `zmasseur main.zsh smile`

`smile`

```sh
#!/bin/zsh -f

function smile {
echo 'c:'
}

smile
```