Skip to content

Commit

Permalink
Remove dollar sign from README.md commands (#584)
Browse files Browse the repository at this point in the history
currently when copying code snippets one has to manually remove the
dollar sign first. Consider:

```sh
$ echo "this can't be copy pasted into terminal because of the initial $"
```
`bash: $: command not found`
`fish: Expected a variable name after this $.`
vs.

```sh
echo "this is fine"
```

---------

Co-authored-by: Adrian Macneil <[email protected]>
  • Loading branch information
o-az and amacneil authored Nov 1, 2024
1 parent 7c3541f commit c092d1a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,33 +60,36 @@ For a comparison between dbmate and other popular database schema migration tool
Install using [NPM](https://www.npmjs.com/):

```sh
$ npm install --save-dev dbmate
$ npx dbmate --help
npm install --save-dev dbmate
npx dbmate --help
```

**macOS**

Install using [Homebrew](https://brew.sh/):

```sh
$ brew install dbmate
brew install dbmate
dbmate --help
```

**Linux**

Install the binary directly:

```sh
$ sudo curl -fsSL -o /usr/local/bin/dbmate https://github.com/amacneil/dbmate/releases/latest/download/dbmate-linux-amd64
$ sudo chmod +x /usr/local/bin/dbmate
sudo curl -fsSL -o /usr/local/bin/dbmate https://github.com/amacneil/dbmate/releases/latest/download/dbmate-linux-amd64
sudo chmod +x /usr/local/bin/dbmate
/usr/local/bin/dbmate --help
```

**Windows**

Install using [Scoop](https://scoop.sh)

```pwsh
$ scoop install dbmate
scoop install dbmate
dbmate --help
```

**Docker**
Expand All @@ -96,13 +99,13 @@ Docker images are published to GitHub Container Registry ([`ghcr.io/amacneil/dbm
Remember to set `--network=host` or see [this comment](https://github.com/amacneil/dbmate/issues/128#issuecomment-615924611) for more tips on using dbmate with docker networking):

```sh
$ docker run --rm -it --network=host ghcr.io/amacneil/dbmate --help
docker run --rm -it --network=host ghcr.io/amacneil/dbmate --help
```

If you wish to create or apply migrations, you will need to use Docker's [bind mount](https://docs.docker.com/storage/bind-mounts/) feature to make your local working directory (`pwd`) available inside the dbmate container:

```sh
$ docker run --rm -it --network=host -v "$(pwd)/db:/db" ghcr.io/amacneil/dbmate new create_users_table
docker run --rm -it --network=host -v "$(pwd)/db:/db" ghcr.io/amacneil/dbmate new create_users_table
```

## Commands
Expand Down

0 comments on commit c092d1a

Please sign in to comment.