Skip to content

Commit

Permalink
docs: Use backticks when referencing custom command annotations, fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Mar 4, 2024
1 parent 9e31187 commit cd798dc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
7 changes: 0 additions & 7 deletions .spellcheckwordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Dump
DXP
Enable
EndeavourOS
ExecRaw
ExecStart
ExecStop
Execute
Expand Down Expand Up @@ -260,7 +259,6 @@ dbimage
dbname
dbpass
dbserver
DBTypes
dbuser
ddev
ddev's
Expand Down Expand Up @@ -352,12 +350,10 @@ help
homeadditions
homebrew
host
HostBinaryExists
hostenv
hostfile
hostname
hostnames
HostWorkingDir
htaccess
html
http
Expand Down Expand Up @@ -471,7 +467,6 @@ one
oneshot
or
oriented
OSTypes
output
pause
pdfreactor
Expand Down Expand Up @@ -512,7 +507,6 @@ projdir
project
projectname
projects
ProjectTypes
proot
proto
provided
Expand Down Expand Up @@ -544,7 +538,6 @@ rfay
rmi
rsync
running
CanRunGlobally
runtime
rw
s
Expand Down
22 changes: 11 additions & 11 deletions docs/content/users/extend/custom-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,31 +135,31 @@ Useful variables for container scripts are:

Custom commands support various annotations in the header for providing additional information to the user.

### Description Annotation
### `Description` Annotation

`Description` should briefly describe the command in its help message.

Usage: `## Description: <command-description>`

Example: `## Description: my great custom command`

### Usage Annotation
### `Usage` Annotation

`Usage` should explain how to use the command in its help message.

Usage: `## Usage: <command-usage>`

Example: `## Usage: commandname [flags] [args]`

### Example Annotation
### `Example` Annotation

`Example` should demonstrate how the command might be used. Use `\n` to force a line break.

Usage: `## Example: <command-example>`

Example: `## Example: commandname\ncommandname -h`

### Flags Annotation
### `Flags` Annotation

`Flags` should explain any available flags, including their shorthand when relevant, for the help message. It has to be encoded according the following definition:

Expand Down Expand Up @@ -212,7 +212,7 @@ Usage: `## AutocompleteTerms: [<list-of-valid-arguments>]`

Example: `## AutocompleteTerms: ["enable","disable","toggle","status"]`

### "CanRunGlobally" Annotation
### `CanRunGlobally` Annotation

This annotation is only available for global host commands.

Expand All @@ -227,15 +227,15 @@ This annotation will have no effect if you are also using one of the following a

Example: `## CanRunGlobally: true`

### ProjectTypes Annotation
### `ProjectTypes` Annotation

If your command should only be visible for a specific project type, `ProjectTypes` will allow you to define the supported types. This is especially useful for global custom commands. See [Quickstart for many CMSes](../../users/quickstart.md) for more information about the supported project types. Multiple types are separated by a comma.

Usage: `## ProjectTypes: <list-of-project-types>`

Example: `## ProjectTypes: drupal7,drupal8,drupal9,backdrop`

### OSTypes Annotation (Host Commands Only)
### `OSTypes` Annotation (Host Commands Only)

If your host command should only run on one or more operating systems, add the `OSTypes` annotation. Multiple types are separated by a comma. Valid types are:

Expand All @@ -247,29 +247,29 @@ Usage: `## OSTypes: <list-of-os-types>`

Example: `## OSTypes: darwin,linux`

### HostBinaryExists Annotation (Host Commands Only)
### `HostBinaryExists` Annotation (Host Commands Only)

If your host command should only run if a particular file exists, add the `HostBinaryExists` annotation.

Usage: `## HostBinaryExists: <path/to/file>`

Example: `## HostBinaryExists: /Applications/Sequel ace.app`

### DBTypes Annotation
### `DBTypes` Annotation

If your command should only be available for a particular database type, add the `DBTypes` annotation. Multiple types are separated by a comma. Valid types the available database types.

Usage: `## DBTypes: <type>`

Example: `## DBTypes: postgres`

### HostWorkingDir Annotation (Container Commands Only)
### `HostWorkingDir` Annotation (Container Commands Only)

If your container command should run from the directory you are running the command in the host, add the `HostWorkingDir` annotation.

Example: `## HostWorkingDir: true`

### "ExecRaw" Annotation (Container Commands Only)
### `ExecRaw` Annotation (Container Commands Only)

Use `ExecRaw: true` to pass command arguments directly to the container as-is.

Expand Down

0 comments on commit cd798dc

Please sign in to comment.