From: "Jun T." <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: [PATCH] _sys_calls: analyze recent syscall.h properly
Date: Thu, 21 Jun 2018 02:11:16 +0900 [thread overview]
Message-ID: <6BB52D51-B35B-4529-B362-DDE98C33F18D@kba.biglobe.ne.jp> (raw)
On recent Fedora (at least 27 and 28), and maybe on other
distributions, /usr/include/bits/syscall.h contains lines like
# define SYS_open __NR_open
_sys_calls doesn't work due the space between '#' and 'define'.
diff --git a/Completion/Unix/Type/_sys_calls b/Completion/Unix/Type/_sys_calls
index bd9b34f70..dadf2b1a4 100644
--- a/Completion/Unix/Type/_sys_calls
+++ b/Completion/Unix/Type/_sys_calls
@@ -12,7 +12,7 @@ local -au syscalls
zparseopts -D -K -E a=all n=none
[[ $OSTYPE = linux* ]] && ifile=/usr/include/bits/syscall.h
-syscalls=( ${${${(M)${(f)"$(<$ifile)"}:#?define[[:blank:]]##SYS_*}#*[[:blank:]]SYS_}%%[[:blank:]]*} ) 2>/dev/null
+syscalls=( ${${${(M)${(f)"$(<$ifile)"}:#\#[[:blank:]]#define[[:blank:]]##SYS_*}#*[[:blank:]]SYS_}%%[[:blank:]]*} ) 2>/dev/null
[[ -n $all ]] && syscalls+=( all )
[[ -n $none ]] && syscalls+=( none )
reply other threads:[~2018-06-20 17:47 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=6BB52D51-B35B-4529-B362-DDE98C33F18D@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).