From dc7f74210a3d03d829cd459bf3171129f3e2f60d Mon Sep 17 00:00:00 2001 From: EricFromCanada Date: Sat, 25 Mar 2017 22:53:33 -0400 Subject: docs: code example reformatting Add labeled fences to most code blocks, monospace terms where appropriate, omit "$" when referring to variables --- docs/External-Commands.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'docs/External-Commands.md') diff --git a/docs/External-Commands.md b/docs/External-Commands.md index d3a590f16..7cc7380a0 100644 --- a/docs/External-Commands.md +++ b/docs/External-Commands.md @@ -2,8 +2,8 @@ Homebrew, like Git, supports *external commands*. This lets you create new commands that can be run like: -```shell -$ brew mycommand --option1 --option3 formula +```sh +brew mycommand --option1 --option3 formula ``` without modifying Homebrew's internals. @@ -11,7 +11,7 @@ without modifying Homebrew's internals. ## Command types External commands come in two flavors: Ruby commands and shell scripts. -In both cases, the command file should be executable (`chmod +x`) and live somewhere in `$PATH`. +In both cases, the command file should be executable (`chmod +x`) and live somewhere in `PATH`. ### Ruby commands An external command `extcmd` implemented as a Ruby command should be named `brew-extcmd.rb`. The command is executed by doing a `require` on the full pathname. As the command is `require`d, it has full access to the Homebrew "environment", i.e. all global variables and modules that any internal command has access to. @@ -24,7 +24,7 @@ A shell script for a command named `extcmd` should be named `brew-extcmd`. This | Variable | Description | |------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `HOMEBREW_CACHE` | Where Homebrew caches downloaded tarballs to, by default `~/Library/Caches/Homebrew`. | -| `HOMEBREW_CELLAR` | The location of the Homebrew Cellar, where software is staged. This will be `$HOMEBREW_PREFIX/Cellar` if that directory exists, or `$HOMEBREW_REPOSITORY/Cellar` otherwise. | +| `HOMEBREW_CELLAR` | The location of the Homebrew Cellar, where software is staged. This will be `HOMEBREW_PREFIX/Cellar` if that directory exists, or `HOMEBREW_REPOSITORY/Cellar` otherwise. | | `HOMEBREW_LIBRARY_PATH`| The directory containing Homebrew’s own application code. | | `HOMEBREW_PREFIX` | Where Homebrew installs software. This is always the grandparent directory of the `brew` executable, `/usr/local` by default. | | `HOMEBREW_REPOSITORY` | If installed from a Git clone, the repository directory (i.e. where Homebrew’s .git directory lives). | @@ -41,12 +41,13 @@ Check if there is a new upstream version of a formula. See the [`README`](https://github.com/youtux/homebrew-livecheck/blob/master/README.md) for more info and usage. Install using: + ```sh brew tap youtux/livecheck ``` ### brew-gem -Install any gem package into a self-contained Homebrew cellar location: +Install any `gem` package into a self-contained Homebrew Cellar location: Note this can also be installed with `brew install brew-gem`. @@ -57,6 +58,7 @@ Get Growl notifications for Homebrew: Install using: + ```sh brew tap homebrew/services ``` -- cgit v1.2.3