Skip to content

Commit e124274

Browse files
Copilotswissspidy
andauthored
Add version constraint examples to wp package install help (#234)
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent b1d3a34 commit e124274

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/Package_Command.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,21 @@ public function browse( $_, $assoc_args ) {
208208
* # Install the latest stable version of a package.
209209
* $ wp package install runcommand/hook
210210
*
211+
* # Install a specific version.
212+
* $ wp package install wp-cli/server-command:2.0.0
213+
*
214+
* # Install with caret operator (allows non-breaking updates).
215+
* $ wp package install wp-cli/server-command:^1.0
216+
*
217+
* # Install with tilde operator (allows patch-level updates).
218+
* $ wp package install wp-cli/server-command:~1.2
219+
*
211220
* # Install the latest stable version (explicitly specified).
212221
* $ wp package install wp-cli/server-command:@stable
213222
*
223+
* # Install from a development branch.
224+
* $ wp package install wp-cli/server-command:dev-main
225+
*
214226
* # Install a package hosted at a GitLab.com URL.
215227
* $ wp package install https://gitlab.com/foo/wp-cli-bar-command.git
216228
*

0 commit comments

Comments
 (0)