1. Start emacs -Q
2. Evaluate the following two test commands in the scratch buffer:
(defun good ()
(interactive)
(pp (all-completions "" (nth 2 (pcomplete-completions-at-point)))))
(defun bad ()
(interactive)
(pp (all-completions "-" (nth 2 (pcomplete-completions-at-point)))))
3. Run shell or eshell
4. Enter `xargs --' in order to complete command line options via
`pcomplete-from-help'.
5. M-x good -> Printed completion strings will have pcomplete-annotation
and pcomplete-help text properties. These are used by the
:annotation-function and the :company-docsig function.
6. M-x bad -> Returned completion strings are stripped of their text
properties.
7. When triggering completion manually by pressing TAB, there are
no annotations displayed in the *Completions* buffer.
If I recall correctly, this functionality worked at some point and the
text properties were not removed, such that annotations worked. The
culprit, which destroys the properties, seems to be
`completion-table-with-quoting' in `pcomplete-completions-at-point', but
I wasn't able to figure out which commit caused this (I did not do any
bisecting).