On Fri, Jun 02, 2017 at 05:07:42PM +0200, Anton Lindqvist wrote:
Custom completions in ksh is currently limited to commands that does not
contain hyphens since such a character cannot be part of an identifier.
We could cheat and replace hyphens with underscores upon performing
completions.
The motivation behind this is that I want to add completions for
ssh-add(1). With the attached diff, I can achieve the following:
$ set -A complete_ssh_add -- $(find ~/.ssh -name '*_rsa')
Comments? OK?
While this works and we (obviously) don't have any binaries in base that
would run into this problem, keep in mind that this workaround munges
the real names: complete_ssh_add can now stand for and would in
fact complete for both ssh_add and ssh-add.