mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-14 11:41:07 +02:00
Akinori Musha: 17719: add support for the pkg_create command
This commit is contained in:
parent
a1d727e5dc
commit
56fb02f1d3
3 changed files with 54 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2002-09-26 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
|
* unposted: Completion/Unix/Command/_bzip2: recognise also .tbz
|
||||||
|
and .tbz2 files
|
||||||
|
|
||||||
|
* Akinori Musha: 17719: Completion/BSD/Command/_bsd_pkg: add
|
||||||
|
support for the pkg_create command
|
||||||
|
|
||||||
2002-09-19 Bart Schaefer <schaefer@zsh.org>
|
2002-09-19 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
* 17692: Src/builtin.c: Prevent typeset of a positional parameter
|
* 17692: Src/builtin.c: Prevent typeset of a positional parameter
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#compdef pkg_add pkg_delete pkg_info
|
#compdef pkg_add pkg_create pkg_delete pkg_info
|
||||||
|
|
||||||
(( $+functions[_bsd_pkg_pkgfiles] )) ||
|
(( $+functions[_bsd_pkg_pkgfiles] )) ||
|
||||||
_bsd_pkg_pkgfiles() {
|
_bsd_pkg_pkgfiles() {
|
||||||
|
@ -79,6 +79,49 @@ _bsd_pkg() {
|
||||||
'*:package to install:_bsd_pkg_pkgfiles'
|
'*:package to install:_bsd_pkg_pkgfiles'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
pkg_create)
|
||||||
|
case "$OSTYPE" in
|
||||||
|
freebsd*)
|
||||||
|
flags=(
|
||||||
|
'-f[specify plist file]:plist file:_files'
|
||||||
|
'(-b)-c[specify comment file]:comment file:_files'
|
||||||
|
'(-b)-d[specify descr file]:descr file:_files'
|
||||||
|
'-Y[assume YES for any questions asked]'
|
||||||
|
'-N[assume NO for any questions asked]'
|
||||||
|
'(-b)-O[packing list only mode]'
|
||||||
|
'-v[be verbose]'
|
||||||
|
'-h[force tar to follow symlinks]'
|
||||||
|
'(-b)-i[specify pre-install script]:pre-install script:_files'
|
||||||
|
'(-b)-I[specify post-install script]:post-install script:_files'
|
||||||
|
'(-b)-P[specify initial dependencies]:dependencies:_bsd_pkg_pkgs'
|
||||||
|
'(-b)-p[specify prefix]:prefix directory:_files -/'
|
||||||
|
'(-b)-k[specify deinstall script]:deinstall script:_files'
|
||||||
|
'(-b)-K[specify post-deinstall script]:post-deinstall script:_files'
|
||||||
|
'(-b)-r[specify req script]:req script:_files'
|
||||||
|
'(-b)-s[specify source directory]:source directory:_files -/'
|
||||||
|
'(-b)-t[specify mktemp template]:mktemp template:_files'
|
||||||
|
'(-b)-X[specify exclude file]:exclude file for tar:_files'
|
||||||
|
'(-b)-D[specify message file]:message file:_files'
|
||||||
|
'(-b)-m[specify mtree file]:mtree file:_files'
|
||||||
|
'(-b)-o[specify origin]:origin:_files -W ${PORTSDIR\:-/usr/ports} -/'
|
||||||
|
'-j[use bzip2]'
|
||||||
|
'-z[use gzip]'
|
||||||
|
'(-c -d -O -i -I -P -p -k -K -r -s -t -X -D -m -o)-b[specify pkgname]:pkgname:_bsd_pkg_pkgs'
|
||||||
|
'*:package file name:_files'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
netbsd*)
|
||||||
|
# NetBSD users, improve me!
|
||||||
|
flags=(
|
||||||
|
'*:package name:_bsd_pkg_pkgs'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
_arguments -s \
|
||||||
|
$flags[@]
|
||||||
|
;;
|
||||||
|
|
||||||
pkg_delete)
|
pkg_delete)
|
||||||
flags=(
|
flags=(
|
||||||
'-D[don'\''t execute deinstallation scripts]'
|
'-D[don'\''t execute deinstallation scripts]'
|
||||||
|
|
|
@ -49,10 +49,10 @@ if [[ "$state" = files ]]; then
|
||||||
$+opt_args[--test] )) && unset decompress
|
$+opt_args[--test] )) && unset decompress
|
||||||
if [[ -z "$decompress" ]]; then
|
if [[ -z "$decompress" ]]; then
|
||||||
_description files expl 'compressed file'
|
_description files expl 'compressed file'
|
||||||
_files "$expl[@]" -g '*.bz2' && return 0
|
_files "$expl[@]" -g '*.(bz2|tbz|tbz2)' && return 0
|
||||||
else
|
else
|
||||||
_description files expl 'file to compress'
|
_description files expl 'file to compress'
|
||||||
_files "$expl[@]" -g '*~*.bz2' && return 0
|
_files "$expl[@]" -g '*~*.(bz2|tbz|tbz2)' && return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue