Skip to content

Commit

Permalink
Update README [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
pkrll committed Jun 16, 2018
1 parent a524fc7 commit b2a61b6
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

- [x] Generate project structure based on templates
- [x] Support for macOS
- [ ] Support for Linux
- [ ] Confirmed support for Linux

<img src=".assets/hazel.gif" width="40%" align="right">

## Table of contents

Expand Down Expand Up @@ -53,11 +55,11 @@ This will install ``Hazel`` in ``/usr/local/bin``, along with its templates file

## Usage

Run ``Hazel`` inside the root folder for your project with the ``init`` command, along with the ``--type``, or ``-t``, flag to generate the directory structure and the files:
Run ``Hazel`` inside the root folder for your project with the ``init`` command, along with the ``--template``, or ``-t``, flag to generate the directory structure and the files:

```bash
$ mkdir SomeApp && cd SomeApp
$ hazel init --type c
$ hazel init --template c

Created obj
Created bin
Expand All @@ -71,8 +73,6 @@ Created src/SomeApp.c
Created .editorconfig
```

<img src=".assets/hazel.gif">

### Customization

``Hazel`` generates new projects based on predefined templates, placed in ``~/.hazel/templates``. You can add your own templates by simply creating a desired directory structure, along with the files you want to be automatically generated, in a subdirectory to ``~/.hazel/templates``.
Expand Down Expand Up @@ -101,11 +101,11 @@ $ tree
   └── __PROJECTNAME__.swift
```

To generate new projects based on the above template, we can now initiate a new project of type ``swift``:
To generate new projects based on the above template, we can now initiate a new project with template ``swift``:

```bash
$ mkdir AwesomeApp && cd AwesomeApp
$ hazel init --type swift
$ hazel init --template swift

Created README.md
Created src
Expand Down Expand Up @@ -138,20 +138,22 @@ Commands:
Options:
-h, --help Print help message and exit
-v, --version Print version information and exit
-q, --quiet Silent mode
```
```bash
$ hazel init --help
Usage: hazel init [argument]

Options:
-t, --type Choose project type
-v, --version Print version information and exit
-t, --template Choose project template
--no-config Do not generate .editorconfig
-h, --help Print help message and exit

```

## Tab completion

``Hazel`` comes equipped with tab completion for ``bash`` and ``zsh``. Add the following to your startup script (``.bashrc``, ``.zshrc``, etc...) to enable tab completion:
``Hazel`` comes equipped with tab completion for ``bash`` and ``zsh``. If you've installed it manually (not with Homebrew), then you need to add the following to your startup script (``.bashrc``, ``.zshrc``, etc...) to enable tab completion:

```bash
which hazel > /dev/null && . "$( hazel --completion-path )"
Expand Down

0 comments on commit b2a61b6

Please sign in to comment.