On Thu, 7 May 2026 12:45:18 GMT, Kevin Walls <[email protected]> wrote:

> One more thing - this is for Linux only? I use Windows and WSL or Cygwin at 
> different times, and I don't think it works properly. On WSL "jcmd.exe" needs 
> to be run, not just "jcmd", not sure if that is the only problem. Cygwin you 
> can run "jcmd" without ".exe" but still doesn't behave as it does on regular 
> Linux. Maybe we should copy the file in place only on Linux? (and if so, that 
> would affect the release note).

That's right. While WSL has access to Windows file system and run windows apps 
like `jcmd.exe` directly from within WSL, the auto-completion covers only Linux 
part. The auto-completion script makes assumption on the `jcmd` executable name 
as the script makes intermediate calls to the tool to construct candidates for 
autocompletion.

I will work on the Copy.gmk. So that the autocompletion script is not copied 
into installation folder for Windows build.

> On the Release Note just thinking again, could be more specific, like: `To 
> enable the autocompletion, at a bash prompt run: 'source 
> <JDK_HOME>/conf/bash-completion/jcmd'. For system-wide...` ...which spells 
> out what to do more clearly. Plus an "on Linux" mention if this is what we 
> are going to do.

Done. Now the RN line in question says:
"To enable the autocompletion, at a Bash prompt run 'source 
<JDK_HOME>/conf/bash-completion/jcmd'. For system-wide availability, install 
the script in `/usr/share/bash-completion/completions/` folder."

I am also not sure about the last sentence. Should we say
"For system-wide availability, on Linux place the script in 
`/usr/share/bash-completion/completions/` folder.".
Thoughts?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/30606#issuecomment-4404919461

Reply via email to