1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-29 19:00:57 +02:00

43080: _sys_calls: analyze recent syscall.h properly

This commit is contained in:
Jun-ichi Takimoto 2018-06-25 11:12:24 +09:00
parent a0233a74e3
commit 3c57f71668
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -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 )