Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: objdump completion should suggest more filenames



Looking into it, this appears to be because objdump doesn't have
custom completion defined; zsh just attempts to parse the help, and
apparently it doesn't do the best job of it.  I've attached a custom
completion file that works properly; please accept it.  If there are
any questions or feedback, add me to the recipients list; I'm not
subscribed to the list, so I won't get normal replies.

On Sun, Sep 3, 2017 at 3:36 PM, Marc Aldorasi <m101010a@xxxxxxxxx> wrote:
> zsh will not complete filenames for objdump unless the last argument is a
> single option.  Instead, it will only autocomplete from the objdump options
> list.  For example:
>
> objdump <tab> (no options listed) will only complete options
>
> objdump -d <tab> (single option at end) will complete filenames, as expected
>
> objdump -dC (multiple options at end) will only complete options
>
> objdump -d -C <tab> (single option at end) will complete filenames, as
> expected
>
> objdump -d -dC (multiple options at end) will only complete options
>
> objdump -dC -d <tab> (single option at end) will complete filenames, as
> expected
>
> objdump -d a.out <tab> (filename at end) will only complete options
>
> objdump -d -- <tab> (option separator at end) will only complete options
>
> zsh should instead allow filename completions anywhere in the command, and
> shouldn't allow option completions after --
>
> This happens with both zsh 5.4.2 on x86_64 linux and zsh 5.4.1 on aarch64
> android linux.

Attachment: _objdump
Description: Binary data



Messages sorted by: Reverse Date, Date, Thread, Author