zsh-workers
 help / color / mirror / code / Atom feed
dadf2b1a4bf71c403b9558958364d231f76b4669 blob 558 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)"}:#\#[[:blank:]]#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 dadf2b1a4 ...
found dadf2b1a4 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).