From: Jun T <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: [PATCH] _object_files: trailing version number for *.so is optional
Date: Mon, 18 Dec 2017 21:03:35 +0900 [thread overview]
Message-ID: <B9547C1C-E10B-47D9-85B4-5293F6E9D1CF@kba.biglobe.ne.jp> (raw)
I've noticed that
zsh% objdump <TAB>
does not complete any object files (*.o) which do not have execute permission.
This is due to the '##' in the condition
$REPLY = *.([ao]|so|elf)(.<->)##
in _object_files.
The trailing version number (.<->) is not required but optional.
In the patch below, I allowed the version number only for *.so.
diff --git a/Completion/Unix/Type/_object_files b/Completion/Unix/Type/_object_files
index 31a13aefc..70b5b6688 100644
--- a/Completion/Unix/Type/_object_files
+++ b/Completion/Unix/Type/_object_files
@@ -5,7 +5,8 @@ local expl
_description files expl 'object file'
__object_file() {
- [[ -x $REPLY || $REPLY = *.([ao]|so|elf)(.<->)## || $REPLY = (core*|*.core) ]]
+ [[ -x $REPLY || $REPLY = *.(a|o|elf) || $REPLY = *.so(.<->)# ||
+ $REPLY = (core*|*.core) ]]
}
_files -g '*(-.e,__object_file,)'
reply other threads:[~2017-12-18 13:07 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=B9547C1C-E10B-47D9-85B4-5293F6E9D1CF@kba.biglobe.ne.jp \
--to=takimoto-j@kba.biglobe.ne.jp \
--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).