Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add usage guide of configuring shell alias #25

Merged
merged 2 commits into from
Aug 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@
<a href="https://www.npmjs.com/package/vail">
<img src="https://img.shields.io/npm/v/vail"/>
</a>
<!-- <a href="https://www.npmjs.com/package/vail">
<a href="https://www.npmjs.com/package/vail">
<img src="https://img.shields.io/npm/dt/vail"/>
</a> -->
<a href="https://github.com/arifszn/vail/actions/workflows/test.yml">
<img src="https://github.com/arifszn/vail/actions/workflows/test.yml/badge.svg"/>
</a>
<a href="https://github.com/arifszn/vail/issues">
<img src="https://img.shields.io/github/issues/arifszn/vail"/>
Expand Down Expand Up @@ -109,6 +106,28 @@ Additionally, you can use Vail to run any command within the context of your app
./node_modules/.bin/vail exec app node --version
```

### Configuring A Shell Alias

Instead of repeatedly typing `./node_modules/.bin/vail` to execute Vail commands, you may wish to configure a shell alias that allows you to execute Vail's commands more easily:

```sh
alias vail='[ -f vail ] && sh vail || sh node_modules/.bin/vail'
```

To make sure this is always available, you may add this to your shell configuration file in your home directory, such as ~/.zshrc or ~/.bashrc, and then restart your shell.

Once the shell alias has been configured, you may execute Vail commands by simply typing vail.

```sh
vail up
```

## Available Services

Vail supports the following services:

- MySQL

## Support

<p>You can show your support by starring this project.</p>
Expand Down