summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Type/_sys_calls2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0d262243a..a003eeac9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@
 	Completion/Darwin/Command/_sc_usage: new utility to complete names
 	of running processes, and three new completion functions which use it.
 
+	* 43080: Completion/Unix/Type/_sys_calls: analyze recent syscall.h
+	properly
+
 2018-06-24  dana  <dana@dana.is>
 
 	* unposted: Completion/Linux/Command/_opkg: Fix mistyped variable
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 )