1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-10-02 08:51:18 +02:00

Initial revision

This commit is contained in:
Tanaka Akira 2000-03-09 11:46:28 +00:00
parent ba4f71f3f7
commit 768d5fc7dc
2 changed files with 60 additions and 0 deletions

23
Completion/Builtins/_zpty Normal file

@ -0,0 +1,23 @@
#compdef zpty
local state line list names expl
_arguments -C -s \
'(-d -w -r -L)-e[echo input characters]' \
'(-d -w -r -L)-b[io to pseudo-terminal blocking]' \
'(-e -b -w -r -L)-d[delete command]:*:name:->name' \
'(-e -b -d -r -L)-w[send string to command]:name:->name:*:strings to write' \
'(-e -b -d -w -L)-r[read string from command]:name:->name:param:_parameters:*:nothing:_nothing' \
'(-e -b -d -w -r)-L[list defined commands as calls]' \
'*::args:_normal'
if [[ $state = name ]] && _wanted zptynames expl 'zpty command names'; then
list=( ${${(f)"$(zpty)"}#*\) } )
names=( ${list%%:*} )
if zstyle -T ":completion:${curcontext}" verbose; then
zformat -a list ' --' ${${(f)"$(zpty)"}#*\) }
compadd "$expl[@]" -d list - "$names[@]"
else
compadd "$expl[@]" - "$names[@]"
fi
fi

37
Completion/User/_getconf Normal file

@ -0,0 +1,37 @@
#compdef getconf
local expl
if [[ CURRENT -eq 2 ]]; then
_tags syswideconfig pathconfig standardsconfig
while _tags; do
if _requested -V syswideconfig expl 'systemwide configuration variables'
then
compadd "$expl[@]" -S '' ARG_MAX BC_BASE_MAX BC_DIM_MAX BC_SCALE_MAX \
BC_STRING_MAX CHILD_MAX COLL_WEIGHTS_MAX EXPR_NEST_MAX LINE_MAX \
NGROUPS_MAX OPEN_MAX RE_DUP_MAX STREAM_MAX TZNAME_MAX
fi
if _requested -V standardsconfig \
expl 'system-standards configuration variables'; then
compadd "$expl[@]" -S '' _POSIX_CHILD_MAX _POSIX_LINK_MAX \
_POSIX_MAX_CANON _POSIX_MAX_INPUT _POSIX_NAME_MAX _POSIX_NGROUPS_MAX \
_POSIX_OPEN_MAX _POSIX_PATH_MAX _POSIX_PIPE_BUF _POSIX_SSIZE_MAX \
_POSIX_STREAM_MAX _POSIX_TZNAME_MAX _POSIX_VERSION \
POSIX2_BC_BASE_MAX POSIX2_BC_DIM_MAX POSIX2_BC_SCALE_MAX \
POSIX2_BC_STRING_MAX POSIX2_COLL_WEIGHTS_MAX POSIX2_EXPR_NEST_MAX \
POSIX2_LINE_MAX POSIX2_RE_DUP_MAX POSIX2_VERSION POSIX2_C_BIND \
POSIX2_C_DEV POSIX2_FORT_DEV POSIX2_FORT_RUN POSIX2_LOCALEDEF \
POSIX2_SW_DEV _XOPEN_VERSION
fi
if _requested -V pathconfig expl 'system path configuration variables'
then
compadd "$expl[@]" -S '' PIPE_BUF _POSIX_CHOWN_RESTRICTED \
_POSIX_NO_TRUNC _POSIX_VDISABLE
compadd "$expl[@]" -S ' ' LINK_MAX MAX_CANON MAX_INPUT NAME_MAX PATH_MAX \
PIPE_BUF
fi
done
else
_files -/
fi