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

Re: [PATCH] Completion: Add _bash, update _sh



Oh, PPPS:

On 9 Jun 2018, at 00:15, dana <dana@xxxxxxx> wrote:
>+  args)
>+    if [[ -n ${opt_args[(i)s--[cs]]} ]]; then
>+      _files && ret=0
>+    else
>+      _normal && ret=0
>+    fi
>+    ;;

I wanted to mention (and probably should have in a comment) that my thinking
here was that you might do something like `bash /usr/bin/mycmd <tab>` and then
if mycmd had completion you'd want it handled as normal. On balance, it's
probably not *super* common for someone to explicitly call bash to execute a
script that has completion, so this might be undesirable — it'll cause custom
scripts that just happen to have the same name as a more popular command to be
completed as that command. So it could be preferable to just have an
unconditional '(-)*:: :_files' or whatever.

I don't feel strongly either way; feel free to edit if you do.

dana



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