-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e17af52
commit 030705d
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
sidebar_position: 895 | ||
--- | ||
|
||
# Command Aliases | ||
|
||
[v2.37.0](https://github.com/aquaproj/aqua/releases/tag/v2.31.0) [3224](https://github.com/aquaproj/aqua/pull/3224) | ||
|
||
You can define command aliases in aqua.yaml. | ||
|
||
This is useful to use multiple versions of the same package. | ||
|
||
```yaml | ||
registries: | ||
- type: standard | ||
ref: v4.246.0 # renovate: depName=aquaproj/aqua-registry | ||
packages: | ||
- name: hashicorp/[email protected] | ||
- name: hashicorp/terraform | ||
version: v0.13.7 | ||
command_aliases: | ||
- command: terraform | ||
alias: terraform-013 | ||
# no_link: true | ||
``` | ||
|
||
Then you can run `terraform` (v1.9.8) and `terraform-013` (v0.13.7). | ||
|
||
```console | ||
$ terraform version | ||
Terraform v1.9.8 | ||
on darwin_arm64 | ||
|
||
$ terraform-013 version | ||
Terraform v0.13.7 | ||
|
||
Your version of Terraform is out of date! The latest version | ||
is 1.9.8. You can update by downloading from https://www.terraform.io/downloads.html | ||
``` | ||
|
||
You can skip creating symbolic links for aliases by `no_link: true` | ||
|
||
```yaml | ||
command_aliases: | ||
- command: terraform | ||
alias: terraform-013 | ||
no_link: true | ||
``` | ||
You can still run aliases via `aqua exec`. | ||
|
||
```sh | ||
aqua exec -- terraform-013 version | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters