mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 07:43:31 +01:00
sdk: add support for local versions and optimize sed calls (#7870)
* Added support for local sdk versions Added support for local versions (prefixed by '+'), so they are filtered out in _listInstallableVersions() and they are displayed correctly by _listAllVersion() * Optimize sed calls Co-authored-by: Marc Cornellà <marc.cornella@live.com>
This commit is contained in:
parent
72707d92b1
commit
10ab2911d3
@ -51,12 +51,13 @@ _listInstalledVersions() {
|
||||
}
|
||||
|
||||
_listInstallableVersions() {
|
||||
__sdkman_list_versions $1 | grep "^ " | sed -e "s/\* /*/g" | \
|
||||
sed -e "s/>//g" | xargs -n 1 echo | grep -v "^*"
|
||||
# Remove local (+) and installed (*) versions from the list
|
||||
__sdkman_list_versions $1 | sed -e '/^[^ ]/d;s/[+*] [^ ]\+//g;s/>//g'
|
||||
}
|
||||
|
||||
_listAllVersion() {
|
||||
__sdkman_list_versions $1 | grep "^ " | sed -e "s/\*/ /g" | sed -e "s/>//g"
|
||||
# Remove (*), (+), and (>) characters from the list
|
||||
__sdkman_list_versions $1 | sed -e '/^[^ ]/d;s/[*+>] //g'
|
||||
}
|
||||
|
||||
_sdk () {
|
||||
|
Loading…
Reference in New Issue
Block a user