Commit 55d0e07
fix(java): fix a bug of assigning results in
At the end of the function `_java_packages', `cur` was modified to be
the list of package names with separators `/` being replaced with
periods `.`. It does not seem to make sense, and the value is
actually not used after the call of `_java_packages'.
Historically, this line was introduced in commit ff01750. This
seems to be a reuse of another similar line in `_java_classes` where
the result is assigned to the array `COMPREPLY` but not to `cur`.
This makes a more sense. In fact, the man page of the `javadoc`
command [1] mentions an example of the package specification, where
the package names have the form of `xxx.yyy.zzz` but not
`xxx/yyy/zzz`.
[1] https://docs.oracle.com/javase/9/javadoc/javadoc-command.htm
Here, we assume that the original intent of the line in ff01750 was
to convert the generated package names to have `xxx.yyy.zzz`, i.e.,
wanted to assign the results to the array `COMPREPLY` but not to
`cur`. This commit implements the original intent.cur but not COMPREPLY
1 parent c2240bc commit 55d0e07
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
0 commit comments