mirror of
https://github.com/halcyon/asdf-java.git
synced 2024-10-05 23:32:11 +08:00
Added support for nushell (#209)
This commit is contained in:
parent
099dcc36fa
commit
8bd88e2422
@ -77,6 +77,10 @@ For fish shell, instead use:
|
||||
|
||||
`. ~/.asdf/plugins/java/set-java-home.fish`
|
||||
|
||||
For nushell shell, instead use:
|
||||
|
||||
`source ~/.asdf/plugins/java/set-java-home.nu`
|
||||
|
||||
For xonsh shell, instead use:
|
||||
|
||||
`source ~/.asdf/plugins/java/set-java-home.xsh`
|
||||
|
11
set-java-home.nu
Normal file
11
set-java-home.nu
Normal file
@ -0,0 +1,11 @@
|
||||
def asdf_update_java_home [] {
|
||||
let $java_path = (asdf which java)
|
||||
|
||||
if $java_path {
|
||||
let $full_path = (realpath $java_path | lines | nth 0 | str trim)
|
||||
|
||||
let $java_home = ($full_path | path dirname | path dirname)
|
||||
let-env JAVA_HOME = $java_home
|
||||
let-env JDK_HOME = $java_home
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user