mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 12:21:19 -03:00
completions/java_home: fix version completion due to change of osascript default output
Apparently the last expression outputs to stdout. Closes #11743
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
function __fish_complete_macos_java_version
|
||||
set -l json (/usr/libexec/java_home -X|plutil -convert json -o - -)
|
||||
osascript -l JavaScript -s o -e "JSON.parse('$json').forEach(e => console.log(`\${e.JVMVersion}\t\${e.JVMArch} \${e.JVMName} by--exec \${e.JVMVendor}`))"
|
||||
osascript -l JavaScript -s o -e "JSON.parse('$json').map(e => `\${e.JVMVersion}\t\${e.JVMArch} \${e.JVMName} by \${e.JVMVendor}`).join('\n')"
|
||||
end
|
||||
|
||||
function __fish_complete_macos_java_home_exec
|
||||
|
||||
Reference in New Issue
Block a user