Compare commits

..

8 Commits

Author SHA1 Message Date
Dossy Shiobara
a396d73a43
Merge 0bbeeffc7c into 31e8c93004 2024-12-18 12:30:39 -05:00
github-actions[bot]
31e8c93004
chore(master): release 0.15.0 (#1807)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-18 10:48:53 -05:00
ooo oo
c778ea1dec
docs: split Lint and Test badges for title asdf in README.MD (#1725)
Co-authored-by: Trevor Brown <Stratus3D@users.noreply.github.com>
2024-12-18 10:37:35 -05:00
Trevor Brown
98b8c6fd92 Merge branch 'OJarrisonn-nu/completion' 2024-12-18 10:32:27 -05:00
Trevor Brown
04fe7e30ca feat: correct description for version preceded by star 2024-12-18 10:31:05 -05:00
Trevor Brown
e8d6372564
Merge branch 'master' into nu/completion 2024-12-18 10:29:06 -05:00
Trevor Brown
8db4c60934
Merge branch 'master' into nu/completion 2024-12-16 19:41:14 -05:00
OJarrisonn
82be580602 feat: improved completions for version in commands
Improved completions for commands such as `asdf global <name> <version>` to list the installed versions

Added "complete asdf plugin versions installed" and "complete asdf plugin versions all" that produce completions for the installed versions and for all versions available for a given plugin

Improved `asdf install` completion to list the installed plugins and all the available versions
2024-06-01 17:40:04 -03:00
8 changed files with 69 additions and 19 deletions

View File

@ -1,5 +1,29 @@
# Changelog
## [0.15.0](https://github.com/asdf-vm/asdf/compare/v0.14.1...v0.15.0) (2024-12-18)
### Features
* golang-rewrite: remove `asdf update` command to prepare for Go version ([#1806](https://github.com/asdf-vm/asdf/issues/1806)) ([15571a2](https://github.com/asdf-vm/asdf/commit/15571a2d28818644673bbaf0fcf7d1d9e342cda4))
### Patches
* completions: Address two Bash completion bugs ([#1770](https://github.com/asdf-vm/asdf/issues/1770)) ([ebdb229](https://github.com/asdf-vm/asdf/commit/ebdb229ce68979a18dae5c0922620b860c56b22f))
* make plugin-test work on alpine linux ([#1778](https://github.com/asdf-vm/asdf/issues/1778)) ([f5a1f3a](https://github.com/asdf-vm/asdf/commit/f5a1f3a0a8bb50796f6ccf618d2bf4cf3bdea097))
* nushell: nushell spread operator ([#1777](https://github.com/asdf-vm/asdf/issues/1777)) ([a0ce37b](https://github.com/asdf-vm/asdf/commit/a0ce37b89bd5eb4ddaa806f96305ee99a8c5d365))
* nushell: Use correct env var for shims dir ([#1742](https://github.com/asdf-vm/asdf/issues/1742)) ([2f07629](https://github.com/asdf-vm/asdf/commit/2f0762991c35da933b81ba6ab75457a504deedbb))
* when download path got removed, it should use -f to force delete the download files ([#1746](https://github.com/asdf-vm/asdf/issues/1746)) ([221507f](https://github.com/asdf-vm/asdf/commit/221507f1c0288f0df13315a7f0f2c0a7bc39e7c2))
### Documentation
* add Korean translation ([#1757](https://github.com/asdf-vm/asdf/issues/1757)) ([9e16306](https://github.com/asdf-vm/asdf/commit/9e16306f42b4bbffd62779aaebb9cbbc9ba59007))
* propose edits for tiny typographical/grammatical errors ([#1747](https://github.com/asdf-vm/asdf/issues/1747)) ([d462b55](https://github.com/asdf-vm/asdf/commit/d462b55ec9868eeaddba4b70850aba908236dd93))
* split Lint and Test badges for title asdf in `README.MD` ([#1725](https://github.com/asdf-vm/asdf/issues/1725)) ([c778ea1](https://github.com/asdf-vm/asdf/commit/c778ea1deca19d8ccd91253c2f206a6b51a0a9b1))
* Update Japanese(ja-jp) Translations ([#1715](https://github.com/asdf-vm/asdf/issues/1715)) ([bd19e4c](https://github.com/asdf-vm/asdf/commit/bd19e4cbdc2f0a9380dbdfcec46584d619e8ed56))
## [0.14.1](https://github.com/asdf-vm/asdf/compare/v0.14.0...v0.14.1) (2024-08-15)

View File

@ -1,4 +1,6 @@
# asdf [![Lint](https://github.com/asdf-vm/asdf/actions/workflows/lint.yml/badge.svg)](https://github.com/asdf-vm/asdf/actions/workflows/lint.yml) [![Tests](https://github.com/asdf-vm/asdf/actions/workflows/tests.yml/badge.svg)](https://github.com/asdf-vm/asdf/actions/workflows/tests.yml)
# asdf
[![Lint](https://github.com/asdf-vm/asdf/actions/workflows/lint.yml/badge.svg)](https://github.com/asdf-vm/asdf/actions/workflows/lint.yml) [![Tests](https://github.com/asdf-vm/asdf/actions/workflows/tests.yml/badge.svg)](https://github.com/asdf-vm/asdf/actions/workflows/tests.yml)
**Manage multiple runtime versions with a single CLI tool, extendable via plugins** - [docs at asdf-vm.com](https://asdf-vm.com/)

View File

@ -9,7 +9,7 @@ not covered under this security policy.**
<!-- x-release-please-start-version -->
```
0.14.1
0.15.0
```
<!-- x-release-please-end -->

50
asdf.nu
View File

@ -74,6 +74,30 @@ module asdf {
}
}
def "complete asdf plugin versions all" [context: string] {
let plugin = $context | str trim | split words | last
^asdf list all $plugin
| lines
| each { |line| $line | str trim }
| prepend "latest"
}
def "complete asdf plugin versions installed" [context: string] {
let plugin = $context | str trim | split words | last
let versions = ^asdf list $plugin
| lines
| each { |line| $line | str trim }
| each { |version| if ($version | str starts-with "*") {{value: ($version | str substring 1..), description: "current version"}} else {{value: $version, description: ""}} }
let latest = ^asdf latest $plugin | str trim
if ($versions | get value | any {|el| $el == $latest}) {
$versions | prepend {value: "latest", description: $"alias to ($latest)"}
} else {
$versions
}
}
# ASDF version manager
export extern main [
subcommand?: string@"complete asdf sub-commands"
@ -145,15 +169,15 @@ module asdf {
# install a package version
export extern "asdf install" [
name?: string # Name of the package
version?: string # Version of the package or latest
name?: string@"complete asdf installed plugins" # Name of the package
version?: string@"complete asdf plugin versions all" # Version of the package or latest
]
# Remove an installed package version
export extern "asdf uninstall" [
name: string@"complete asdf installed" # Name of the package
version: string # Version of the package
version: string@"complete asdf plugin versions installed" # Version of the package
]
# Display current version
@ -169,31 +193,31 @@ module asdf {
# Display install path for an installled package version
export extern "asdf where" [
name: string@"complete asdf installed" # Name of installed package
version?: string # Version of installed package
version?: string@"complete asdf plugin versions installed" # Version of installed package
]
# Set the package local version
export extern "asdf local" [
name: string@"complete asdf installed" # Name of the package
version?: string # Version of the package or latest
version?: string@"complete asdf plugin versions installed" # Version of the package or latest
]
# Set the package global version
export extern "asdf global" [
name: string@"complete asdf installed" # Name of the package
version?: string # Version of the package or latest
version?: string@"complete asdf plugin versions installed" # Version of the package or latest
]
# Set the package to version in the current shell
export extern "asdf shell" [
name: string@"complete asdf installed" # Name of the package
version?: string # Version of the package or latest
version?: string@"complete asdf plugin versions installed" # Version of the package or latest
]
# Show latest stable version of a package
export extern "asdf latest" [
name: string # Name of the package
version?: string # Filter latest stable version from this version
name: string@"complete asdf installed" # Name of the package
version?: string@"complete asdf plugin versions installed" # Filter latest stable version from this version
]
# Show latest stable version for all installed packages
@ -202,13 +226,13 @@ module asdf {
# List installed package versions
export extern "asdf list" [
name?: string@"complete asdf installed" # Name of the package
version?: string # Filter the version
version?: string@"complete asdf plugin versions installed" # Filter the version
]
# List all available package versions
export def "asdf list all" [
name: string@"complete asdf installed" # Name of the package
version?: string="" # Filter the version
version?: string@"complete asdf plugin versions installed"="" # Filter the version
] {
^asdf list all $name $version | lines | parse "{version}" | str trim
}
@ -216,7 +240,7 @@ module asdf {
# Show documentation for plugin
export extern "asdf help" [
name: string@"complete asdf installed" # Name of the plugin
version?: string # Version of the plugin
version?: string@"complete asdf plugin versions installed" # Version of the plugin
]
# Execute a command shim for the current version
@ -237,7 +261,7 @@ module asdf {
# Recreate shims for version package
export extern "asdf reshim" [
name?: string@"complete asdf installed" # Name of the package
version?: string # Version of the package
version?: string@"complete asdf plugin versions installed" # Version of the package
]
# List the plugins and versions that provide a command

View File

@ -36,7 +36,7 @@ asdf primarily requires `git` & `curl`. Here is a _non-exhaustive_ list of comma
```shell
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.15.0
```

View File

@ -39,7 +39,7 @@ asdf primarily requires `git` & `curl`. Here is a _non-exhaustive_ list of comma
<!-- x-release-please-start-version -->
```shell
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.15.0
```
<!-- x-release-please-end -->

View File

@ -35,7 +35,7 @@ asdf primarily requires `git` & `curl`. Here is a _non-exhaustive_ list of comma
<!-- x-release-please-start-version -->
```shell
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.15.0
```
<!-- x-release-please-end -->

View File

@ -1 +1 @@
0.14.1
0.15.0