zsh-workers
 help / color / mirror / code / Atom feed
bd9b34f70b6ac0bdfdb403ff2526e1d4dc05417e blob 545 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 
#autoload

# Options:
#
# -a    add "all" as an additional match
# -n    add "none" as an additional match

local expl all none
local ifile=/usr/include/sys/syscall.h
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
[[ -n $all ]] && syscalls+=( all )
[[ -n $none ]] && syscalls+=( none )

_description syscalls expl 'system call'
compadd "$@" "$expl[@]" -a syscalls
debug log:

solving bd9b34f ...
found bd9b34f in https://git.vuxu.org/mirror/zsh/

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