zsh-workers
 help / color / mirror / code / Atom feed
From: dana <dana@dana.is>
To: Zsh workers <zsh-workers@zsh.org>
Subject: [PATCH] Completion: Small fixes for _files, _object_files
Date: Mon, 11 Jun 2018 06:01:46 -0500	[thread overview]
Message-ID: <D86F56D4-518E-4BD1-8DBB-D7B097956F6C@dana.is> (raw)

I noticed that _object_files doesn't respect the description set through
_arguments, nor the default one in the function itself. This seems to fix it
(and i made a similar change in _files) — i *think* this is the order these
should be passed in generally, isn't it?

dana


diff --git a/Completion/Unix/Type/_files b/Completion/Unix/Type/_files
index 2b0c5580a..5df22ea46 100644
--- a/Completion/Unix/Type/_files
+++ b/Completion/Unix/Type/_files
@@ -121,7 +121,7 @@ for def in "$pats[@]"; do
      done
    fi
         else
-          _path_files "$expl[@]" -g "$pat" "$opts[@]" && ret=0
+          _path_files -g "$pat" "$opts[@]" "$expl[@]" && ret=0
         fi
       done
       (( ret )) || break

diff --git a/Completion/Unix/Type/_object_files b/Completion/Unix/Type/_object_files
index 595265116..6b931372f 100644
--- a/Completion/Unix/Type/_object_files
+++ b/Completion/Unix/Type/_object_files
@@ -9,4 +9,4 @@ __object_file() {
  $REPLY = (core*|*.core) ]]
 }
 
-_files -g '*(-.e,__object_file,)'
+_files -g '*(-.e,__object_file,)' "$@" "${(@)expl}"


                 reply	other threads:[~2018-06-11 11:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D86F56D4-518E-4BD1-8DBB-D7B097956F6C@dana.is \
    --to=dana@dana.is \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).