Skip to content

Commit

Permalink
Remove brew cask search from documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Jun 20, 2018
1 parent 625688d commit 484cf30
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 24 deletions.
30 changes: 9 additions & 21 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,26 @@ $ brew --version
Homebrew-Cask is implemented as a subcommand of Homebrew. All Homebrew-Cask commands begin with `brew cask`. Homebrew-Cask has its own set of command verbs many of which are similar to Homebrew’s. The most frequently-used
commands are:

* `search` — searches all known Casks
* `install` — installs the given Cask
* `uninstall` — uninstalls the given Cask
* `list` — lists installed Casks

## Searching for Casks

The `brew cask search` command accepts a series of substring arguments, and returns tokens representing matching Casks. Let’s see if there’s a Cask for Google Chrome:
To search for Casks, use `brew search`. Let’s see if there’s a Cask for Google Chrome:

```bash
$ brew cask search chrome
$ brew search google-chrome
==> Casks
google-chrome
```

A `search` command with no search term will list all available Casks:

```bash
$ brew cask search
# <list of all available Casks>
homebrew/cask-versions/google-chrome-beta
homebrew/cask-versions/google-chrome-canary
homebrew/cask-versions/google-chrome-dev
```

## Installing Casks

The command `brew cask install` accepts a Cask token as returned by `brew cask search`. Let’s try to install Google Chrome:
The command `brew cask install` accepts one or multiple Cask tokens. Let’s try to install Google Chrome:

```bash
$ brew cask install google-chrome
Expand Down Expand Up @@ -192,20 +189,11 @@ Note that you still can override the environment variable `HOMEBREW_CASK_OPTS` b
$ brew cask install --appdir="/Applications" google-chrome
```

## Advanced Searching

The default search algorithm is a lax substring approach, which does not use the command-line arguments exactly as given. If you need to specify a search more precisely, a single search argument enclosed in `/` characters will be taken as a Ruby regular expression:

```bash
$ brew cask search '/^google.c[a-z]rome$/'
google-chrome
```

## Other Ways to Specify a Cask

Most `brew cask` commands can accept a Cask token as an argument. As described above, the token on the command line can take the form of:

* A token as returned by `brew cask search`, _eg_: `google-chrome`.
* A simple token, _eg_: `google-chrome`.
* A fully-qualified token which includes the Tap, _eg_: `homebrew/cask-fonts/font-symbola`.

`brew cask` also accepts three other forms as arguments:
Expand Down
2 changes: 0 additions & 2 deletions doc/cask_language_reference/stanzas/name.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@
Its first instance should use the latin alphabet, include the software vendor’s name, and be as verbose as possible while still making sense.

A good example is [`pycharm-ce`](https://github.com/Homebrew/homebrew-cask/blob/fc05c0353aebb28e40db72faba04b82ca832d11a/Casks/pycharm-ce.rb#L6#L7). `Jetbrains PyCharm Community Edition` makes sense even though it is likely never referenced as such anywhere, but `Jetbrains PyCharm Community Edition CE` doesn’t, hence why it has a second line. Another example are casks whose original names do not use the latin alphabet, like [`cave-story`](https://github.com/Homebrew/homebrew-cask/blob/0fe48607f5656e4f1de58c6884945378b7e6f960/Casks/cave-story.rb#L7#L9).

Note that `brew cask search` and `brew cask list` are not yet capable of using the information stored in the `name` stanza.
2 changes: 1 addition & 1 deletion doc/development/adding_a_cask.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ end

### Generating a Token for the Cask

The Cask **token** is the mnemonic string people will use to interact with the Cask via `brew cask install`, `brew cask search`, etc. The name of the Cask **file** is simply the token with the extension `.rb` appended.
The Cask **token** is the mnemonic string people will use to interact with the Cask via `brew cask install`, etc. The name of the Cask **file** is simply the token with the extension `.rb` appended.

The easiest way to generate a token for a Cask is to run this command:

Expand Down

0 comments on commit 484cf30

Please sign in to comment.