.gear/autobuild.update | 5 + .gear/autobuild.watch | 2 + .gear/patches/0001-pty-fixes-from-Fedora.patch | 132 ++++ ...-zsh-executable-discovery-if-proc-missing.patch | 27 + .../alt-rpm-0001-_rpm-complete-q-lastchange.patch | 24 + ...pm-optionally-complete-rpm-ba-and-similar.patch | 64 ++ .gear/rules | 3 + .../tags/d6bfe888700f47be827e7c6c616284b4c8eadaa0 | 17 + .gear/tags/list | 1 + Completion/ALT/.distfiles | 3 + Completion/ALT/Command/.distfiles | 12 + Completion/ALT/Command/_add_changelog | 14 + Completion/ALT/Command/_buildreq | 19 + Completion/ALT/Command/_control | 29 + Completion/ALT/Command/_control_d | 21 + Completion/ALT/Command/_gear | 183 ++++++ Completion/ALT/Command/_girar | 40 ++ Completion/ALT/Command/_girar_remote | 278 +++++++++ Completion/ALT/Command/_hasher | 211 +++++++ Completion/ALT/Command/_sisyphus_check | 29 + Completion/ALT/Type/.distfiles | 5 + Completion/ALT/Type/_girar_info | 149 +++++ Completion/ALT/Type/_sisyphus_check_tests | 33 + Completion/Debian/Command/_apt | 74 +-- Completion/Debian/Command/_aptitude | 12 +- Completion/Linux/Command/_pmount | 43 ++ Completion/Linux/Command/_vzctl | 101 ++++ Completion/Redhat/Type/_rpm_packages | 129 ++++ Completion/Unix/Command/_gdb | 34 +- Completion/Unix/Type/_hosts | 10 +- Doc/Zsh/compsys.yo | 2 +- Doc/ztexi.yo | 2 +- Src/Modules/zpty.c | 7 +- Src/Zle/complete.mdd | 2 +- zcfg/zlerc | 77 +++ zcfg/zlogout | 16 + zcfg/zprofile | 11 + zcfg/zshenv | 10 + zcfg/zshrc | 51 ++ zsh.spec | 665 +++++++++++++++++++++ 40 files changed, 2495 insertions(+), 52 deletions(-) diff --git a/.gear/autobuild.update b/.gear/autobuild.update new file mode 100644 index 000000000..6ee89dac0 --- /dev/null +++ b/.gear/autobuild.update @@ -0,0 +1,5 @@ +#git fetch --tags git://zsh.git.sourceforge.net/gitroot/zsh/zsh && +git fetch --tags git://git.code.sf.net/p/zsh/code && +git merge zsh-$new_version && +gear-store-tags -ac && +new_source=%name-%version.tar diff --git a/.gear/autobuild.watch b/.gear/autobuild.watch new file mode 100644 index 000000000..0619593bc --- /dev/null +++ b/.gear/autobuild.watch @@ -0,0 +1,2 @@ +version=3 +https://github.com/zsh-users/zsh/releases (?:.*)/zsh-([\d.]+).tar.gz diff --git a/.gear/patches/0001-pty-fixes-from-Fedora.patch b/.gear/patches/0001-pty-fixes-from-Fedora.patch new file mode 100644 index 000000000..5603a1e77 --- /dev/null +++ b/.gear/patches/0001-pty-fixes-from-Fedora.patch @@ -0,0 +1,132 @@ +From 0d219259acb1f9a0e829c2ecf767fe2695bc376e Mon Sep 17 00:00:00 2001 +From: "Alexey I. Froloff" +Date: Tue, 10 May 2011 02:41:26 +0400 +Subject: [PATCH] pty fixes from Fedora + +Co-authored-by: Arseny Maslennikov + +--- + Src/Modules/zpty.c | 6 ++---- + Src/builtin.c | 2 +- + Src/init.c | 36 +++++++++++++++++++++++++++++++++--- + configure.ac | 2 +- + 4 files changed, 37 insertions(+), 9 deletions(-) + +diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c +index 7f3dd26d6..0ac26e623 100644 +--- a/Src/Modules/zpty.c ++++ b/Src/Modules/zpty.c +@@ -354,6 +354,8 @@ newptycmd(char *nam, char *pname, char **args, int echo, int nblock) + + if (get_pty(0, &slave)) + exit(1); ++ SHTTY = slave; ++ attachtty(mypid); + #ifdef TIOCGWINSZ + /* Set the window size before associating with the terminal * + * so that we don't get hit with a SIGWINCH. I'm paranoid. */ +@@ -389,10 +391,6 @@ newptycmd(char *nam, char *pname, char **args, int echo, int nblock) + ioctl(slave, TIOCSCTTY, 0); + #endif + +- close(0); +- close(1); +- close(2); +- + dup2(slave, 0); + dup2(slave, 1); + dup2(slave, 2); +diff --git a/Src/builtin.c b/Src/builtin.c +index aa5767cf1..b968b879f 100644 +--- a/Src/builtin.c ++++ b/Src/builtin.c +@@ -6272,7 +6272,7 @@ bin_read(char *name, char **args, Options ops, UNUSED(int func)) + if (!zleactive) { + if (SHTTY == -1) { + /* need to open /dev/tty specially */ +- if ((SHTTY = open("/dev/tty", O_RDWR|O_NOCTTY)) != -1) { ++ if ((SHTTY = block_open("/dev/tty", O_RDWR|O_NOCTTY)) != -1) { + haso = 1; + oshout = shout; + init_shout(); +diff --git a/Src/init.c b/Src/init.c +index 99ccc16cf..f37ad63e1 100644 +--- a/Src/init.c ++++ b/Src/init.c +@@ -616,7 +616,7 @@ init_io(char *cmd) + if (isatty(0)) { + zsfree(ttystrname); + if ((ttystrname = ztrdup(ttyname(0)))) { +- SHTTY = movefd(open(ttystrname, O_RDWR | O_NOCTTY)); ++ SHTTY = movefd(block_open(ttystrname, O_RDWR | O_NOCTTY)); + #ifdef TIOCNXCL + /* + * See if the terminal claims to be busy. If so, and fd 0 +@@ -657,7 +657,7 @@ init_io(char *cmd) + ttystrname = ztrdup(ttyname(1)); + } + if (SHTTY == -1 && +- (SHTTY = movefd(open("/dev/tty", O_RDWR | O_NOCTTY))) != -1) { ++ (SHTTY = movefd(block_open("/dev/tty", O_RDWR | O_NOCTTY))) != -1) { + zsfree(ttystrname); + ttystrname = ztrdup(ttyname(SHTTY)); + } +@@ -972,7 +972,7 @@ setupvals(char *cmd, char *runscript, char *zsh_name) + path = (char **) zalloc(sizeof(*path) * 5); + path[0] = ztrdup("/bin"); + path[1] = ztrdup("/usr/bin"); +- path[2] = ztrdup("/usr/ucb"); ++ path[2] = ztrdup("/usr/X11R6/bin"); + path[3] = ztrdup("/usr/local/bin"); + path[4] = NULL; + +@@ -1812,3 +1812,33 @@ zsh_main(UNUSED(int argc), char **argv) + : "use 'logout' to logout."); + } + } ++ ++/**/ ++int ++block_open (const char *tty, int flags) ++{ ++ int saved_errno; ++ int fd; ++ ++ if ((flags & O_NONBLOCK) == 0) { ++ fd = open (tty, flags | O_NONBLOCK); ++ if (fd == -1) ++ return fd; ++ flags = fcntl(fd, F_GETFL); ++ if (flags == -1) ++ goto bad; ++ flags &= ~O_NONBLOCK; ++ if (fcntl(fd, F_SETFL, flags) == -1) ++ goto bad; ++ } ++ else ++ fd = open (tty, flags); ++ ++ return fd; ++ ++bad: ++ saved_errno = errno; ++ close (fd); ++ errno = saved_errno; ++ return -1; ++} +diff --git a/configure.ac b/configure.ac +index af8c5bba8..1c3f28b74 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -680,7 +680,7 @@ AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \ + unistd.h sys/capability.h \ + utmp.h utmpx.h sys/types.h pwd.h grp.h poll.h sys/mman.h \ + netinet/in_systm.h pcre.h langinfo.h wchar.h stddef.h \ +- sys/stropts.h iconv.h ncurses.h ncursesw/ncurses.h \ ++ stropts.h iconv.h ncurses.h ncursesw/ncurses.h \ + ncurses/ncurses.h) + if test x$dynamic = xyes; then + AC_CHECK_HEADERS(dlfcn.h) +-- +2.33.7 + diff --git a/.gear/patches/alt-packaging-0001-compaudit-fix-zsh-executable-discovery-if-proc-missing.patch b/.gear/patches/alt-packaging-0001-compaudit-fix-zsh-executable-discovery-if-proc-missing.patch new file mode 100644 index 000000000..cab5ea334 --- /dev/null +++ b/.gear/patches/alt-packaging-0001-compaudit-fix-zsh-executable-discovery-if-proc-missing.patch @@ -0,0 +1,27 @@ +From 2e360340ce16219bd76e2e528f51a27c9b9d035b Mon Sep 17 00:00:00 2001 +From: Arseny Maslennikov +Date: Sun, 28 Feb 2021 21:49:01 +0300 +Subject: [PATCH] Completion/compaudit: fix zsh executable discovery if /proc + missing + +@packaged_zsh_executable@ is replaced with a real file during the +package build process. +--- + Completion/compaudit | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Completion/compaudit b/Completion/compaudit +index 93a043124..6a3b0e497 100644 +--- a/Completion/compaudit ++++ b/Completion/compaudit +@@ -94,6 +94,7 @@ local -a _i_exes + _i_exes=( + /proc/$$/exe + /proc/$$/object/a.out ++ @packaged_zsh_executable@ + ) + local _i_exe + +-- +2.29.2 + diff --git a/.gear/patches/alt-rpm-0001-_rpm-complete-q-lastchange.patch b/.gear/patches/alt-rpm-0001-_rpm-complete-q-lastchange.patch new file mode 100644 index 000000000..3fcd996d0 --- /dev/null +++ b/.gear/patches/alt-rpm-0001-_rpm-complete-q-lastchange.patch @@ -0,0 +1,24 @@ +From 042ec87ebb0fc610205f60dd46b21b9a4f8f43b0 Mon Sep 17 00:00:00 2001 +From: Arseny Maslennikov +Date: Tue, 2 Nov 2021 00:01:35 +0300 +Subject: [PATCH] _rpm: complete -q --lastchange + +--- + Completion/Redhat/Command/_rpm | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Completion/Redhat/Command/_rpm b/Completion/Redhat/Command/_rpm +index e3469245f..41aafe74c 100644 +--- a/Completion/Redhat/Command/_rpm ++++ b/Completion/Redhat/Command/_rpm +@@ -227,6 +227,7 @@ _rpm () { + '(-i --info)'{-i,--info}'[display package information]' \ + '--changelog' '--changes' '--dupes' \ + '--last[order packages by install time]' \ ++ '--lastchange[(ALT specific) display last changelog entry]' \ + '--xml' \ + '--recommends[list capabilities recommended by packages]' \ + '(--requires)-R[list capabilities on which packages depend]' \ +-- +2.33.0 + diff --git a/.gear/patches/alt-rpm-0002-_rpm-optionally-complete-rpm-ba-and-similar.patch b/.gear/patches/alt-rpm-0002-_rpm-optionally-complete-rpm-ba-and-similar.patch new file mode 100644 index 000000000..f11722b2f --- /dev/null +++ b/.gear/patches/alt-rpm-0002-_rpm-optionally-complete-rpm-ba-and-similar.patch @@ -0,0 +1,64 @@ +From 41e680b1b078f114c7b160fc020395c2063c5e74 Mon Sep 17 00:00:00 2001 +From: Arseny Maslennikov +Date: Wed, 26 Apr 2023 16:06:28 +0300 +Subject: [PATCH] _rpm: optionally complete `rpm -ba` and similar + +For historical reasons many old users of RPM who build packages have +rpmbuild aliased to rpm and type "rpm -ba", etc. We now complete build +mode options for `rpm` if e. g. the following zstyle is set to true: + % zstyle ':completion::complete:rpm:*:options' build-modes true + +Not sure at the moment if this makes sense in upstream, though. +--- + Completion/Redhat/Command/_rpm | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/Completion/Redhat/Command/_rpm b/Completion/Redhat/Command/_rpm +index 1edbae9f0..825bfc932 100644 +--- a/Completion/Redhat/Command/_rpm ++++ b/Completion/Redhat/Command/_rpm +@@ -52,6 +52,7 @@ _rpm () { + typeset -A opt_args + local ret + local -a tmp expl opts commonopts selectopts fileopts pathopts buildopts queryopts ++ local -a alt_buildmode_opts + + commonopts=( + '(-v --verbose)--quiet[print as little as possible]' +@@ -110,6 +111,14 @@ _rpm () { + '--dbpath=[specify rpm database path]:path:_directories' + ) + ++ # We'd like these to be optionally completable if service is "rpm". ++ alt_buildmode_opts=( ++ '(-r -t)-b+[build mode (spec file)]:build stage:((p\:execute\ \%prep\ stage l\:do\ a\ list\ check c\:execute\ build\ stage i\:execute\ install\ stage b\:build\ a\ binary\ package a\:build\ binary\ and\ source\ packages s\:build\ source\ package\ only r\:build\ source\ package\ only\ -\ calculate\ build\ requires)):*:build:->build_b' ++ '(-b -t)-r+[build mode (source package)]:build stage:((p\:execute\ \%prep\ stage l\:do\ a\ list\ check c\:execute\ build\ stage i\:execute\ install\ stage b\:build\ a\ binary\ package a\:build\ binary\ and\ source\ packages s\:build\ source\ package\ only r\:build\ source\ package\ only\ -\ calculate\ build\ requires)):*:build:->build_r' ++ '(-b -r)-t+[build mode (tar file)]:build stage:((p\:execute\ \%prep\ stage l\:do\ a\ list\ check c\:execute\ build\ stage i\:execute\ install\ stage b\:build\ a\ binary\ package a\:build\ binary\ and\ source\ packages s\:build\ source\ package\ only r\:build\ source\ package\ only\ -\ calculate\ build\ requires)):*:build:->build_t' ++ --{rebuild,recompile}':*:source rpm file:->build_r' ++ ) ++ + buildopts=( + '--rpmfcdebug[debug dependencies generation]' + '--buildroot=[override the build root]:build root directory:_directories' +@@ -170,14 +179,14 @@ _rpm () { + '--setcaps[set capabilities of files in the given package]:*:package:->setattrs' + '--restore[restore owner, group, permissions and capabilities of files in the given package]:*:package:->setattrs' + ) ++ if zstyle -t ":completion:${curcontext}:options" build-modes; then ++ opts+=( $alt_buildmode_opts ) ++ fi + ;; + rpmbuild) + [[ -prefix -r ]] && pathopts[1]= + opts+=( $buildopts +- '(-r -t)-b+[build mode (spec file)]:build stage:((p\:execute\ \%prep\ stage l\:do\ a\ list\ check c\:execute\ build\ stage i\:execute\ install\ stage b\:build\ a\ binary\ package a\:build\ binary\ and\ source\ packages s\:build\ source\ package\ only r\:build\ source\ package\ only\ -\ calculate\ build\ requires)):*:build:->build_b' +- '(-b -t)-r+[build mode (source package)]:build stage:((p\:execute\ \%prep\ stage l\:do\ a\ list\ check c\:execute\ build\ stage i\:execute\ install\ stage b\:build\ a\ binary\ package a\:build\ binary\ and\ source\ packages s\:build\ source\ package\ only r\:build\ source\ package\ only\ -\ calculate\ build\ requires)):*:build:->build_b' +- '(-b -r)-t+[build mode (tar file)]:build stage:((p\:execute\ \%prep\ stage l\:do\ a\ list\ check c\:execute\ build\ stage i\:execute\ install\ stage b\:build\ a\ binary\ package a\:build\ binary\ and\ source\ packages s\:build\ source\ package\ only r\:build\ source\ package\ only\ -\ calculate\ build\ requires)):*:build:->build_t' +- --{rebuild,recompile}':*:source rpm file:->build_r' ++ $alt_buildmode_opts + ) + ;; + rpmspec) +-- +2.33.7 + diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 000000000..ef9ee1923 --- /dev/null +++ b/.gear/rules @@ -0,0 +1,3 @@ +tar: zsh-@version@:. name=zsh-@version@ +diff: zsh-@version@:. . +copy: .gear/patches/* diff --git a/.gear/tags/d6bfe888700f47be827e7c6c616284b4c8eadaa0 b/.gear/tags/d6bfe888700f47be827e7c6c616284b4c8eadaa0 new file mode 100644 index 000000000..e1cb966f9 --- /dev/null +++ b/.gear/tags/d6bfe888700f47be827e7c6c616284b4c8eadaa0 @@ -0,0 +1,17 @@ +object 73d317384c9225e46d66444f93b46f0fbe7084ef +type commit +tag zsh-5.9 +tagger dana 1652555470 -0500 + +Release 5.9 +-----BEGIN PGP SIGNATURE----- + +iQEzBAABCAAdFiEEfKfsqvBiFrkPiUFGrPgUbK6Mu8QFAmJ//s4ACgkQrPgUbK6M +u8Tx6Af/e4ioREB1H8RkTI4QDZTyfWietxFo8JA3X9GyF5ta9K82WyY2/W1NddtX +kdms2KBakuVkEWNCRJtE7GzaJ1JlDx/Sk7da5K4vnEuoFaLMALtmcxXSkp8yvFQt +6ujhBAu6yR7NxiENR/XDlvpa3uH7sq5OYnltbllbkK38YwD22iwjEVsZWJxl4lGp +12UB1x+o0K2pPpUazn/hgxYw126wOHXr0fsLGk8VYO1d2y4K5LzUQ3Om2i0f4S89 +a0WZQUAl27Mzd4nSW5r7KNaZP5hnMv0cPfFhyvdjyMRPvw5xiOfFWF1TxobRrXlK +p1PgIN6uAbe+4ic7aPVt2cYPYNLTNw== +=4Mmz +-----END PGP SIGNATURE----- diff --git a/.gear/tags/list b/.gear/tags/list new file mode 100644 index 000000000..18b7d5686 --- /dev/null +++ b/.gear/tags/list @@ -0,0 +1 @@ +d6bfe888700f47be827e7c6c616284b4c8eadaa0 zsh-5.9 diff --git a/Completion/ALT/.distfiles b/Completion/ALT/.distfiles new file mode 100644 index 000000000..9e276f99b --- /dev/null +++ b/Completion/ALT/.distfiles @@ -0,0 +1,3 @@ +DISTFILES_SRC=' +.distfiles +' diff --git a/Completion/ALT/Command/.distfiles b/Completion/ALT/Command/.distfiles new file mode 100644 index 000000000..b7b8d3a30 --- /dev/null +++ b/Completion/ALT/Command/.distfiles @@ -0,0 +1,12 @@ +DISTFILES_SRC=' +.distfiles +_add_changelog +_buildreq +_control +_control_d +_gear +_girar +_girar_remote +_hasher +_sisyphus_check +' diff --git a/Completion/ALT/Command/_add_changelog b/Completion/ALT/Command/_add_changelog new file mode 100644 index 000000000..8eb22023d --- /dev/null +++ b/Completion/ALT/Command/_add_changelog @@ -0,0 +1,14 @@ +#compdef add_changelog + +local curcontext="$curcontext" context state line ret=1 + +_arguments -S \ + '(- :)'{-h,--help}'[show usage and exit]' \ + '(-r --rpm)'{-r,--rpm}'=[path to RPM]:rpm:_files -g "*(-*)"' \ + '(-s --stamper)'{-s,--stamper}'=[path to STAMPER]:stamper:_files -g "*(-*)"' \ + '*'{-a,--args}'=[additional arguments for RPM]:rpm args' \ + '(-e --entry)'{-e,--entry}'=[changelog entry text]:changelog entry' \ + '--nocheck[do not check specfile versions]' \ + '*:spec:_files -g "*.spec"' && ret=0 + +return $ret diff --git a/Completion/ALT/Command/_buildreq b/Completion/ALT/Command/_buildreq new file mode 100644 index 000000000..4b4c9200d --- /dev/null +++ b/Completion/ALT/Command/_buildreq @@ -0,0 +1,19 @@ +#compdef buildreq + +local curcontext="$curcontext" context state line ret=1 + +_arguments -S \ + '(- :)'{-h,--help}'[show usage and exit]' \ + '(-e --essential)'{-e,--essential=}'[file with list of essential packages]:file:_files' \ + '(-i --ignore)'{-i,--ignore=}'[file with list of packages to ignore]:file:_files' \ + '(-f --filereq)'{-f,--filereq=}'[path to FILEREQ]:filereq:_files -g "*(-*)"' \ + '(-p --packagereq)'{-p,--packagereq=}'[path to PACKAGEREQ]:packagereq:_files -g "*(-*)"' \ + '(-r --rpm)'{-r,--rpm=}'[path to RPM]:rpm:_files -g "*(-*)"' \ + '-b-[RPM build stage]:stage:((p\:"%prep" c\:"%build" i\:"%install"))' \ + '(--reset-args)*--args=[additional arguments for RPM]:rpm args' \ + '(--reset-args)*--define=[define RPM macro]:macro definition' \ + '--reset-args[reset arguments list for RPM]' \ + '(-t --term)'{-t,--term=}'[redefine TERM variable]:terminal:_terminals' \ + '*:spec:_files -g "*.spec"' && ret=0 + +return $ret diff --git a/Completion/ALT/Command/_control b/Completion/ALT/Command/_control new file mode 100644 index 000000000..80b4d73ae --- /dev/null +++ b/Completion/ALT/Command/_control @@ -0,0 +1,29 @@ +#compdef control + +local expl verbose + +verbose= +zstyle -t ":completion:${curcontext}:facilities" verbose && + verbose=1 + +__control_facilities() +{ + local i + local -a facilities + facilities=() + + if [[ -n "$verbose" ]]; then + for i in /etc/control.d/facilities/*~*(.rpm*|.orig|~)(-*:t); do + facilities+=( "$i:$(/etc/control.d/facilities/$i summary 2>/dev/null)" ) + done + facilities=( "${(@)${(@)facilities/:[[:space:]]##/:}%:[[:space:]]#}" ) + _describe -t control-facilities 'control facility' facilities "$@" + else + _wanted control-facilities expl 'control facility' compadd "$@" - /etc/control.d/facilities/*~*(.rpm*|.orig|~)(-*:t) + fi +} + +_arguments -s \ + ':facility:__control_facilities' \ + '*::status: _control_d' + diff --git a/Completion/ALT/Command/_control_d b/Completion/ALT/Command/_control_d new file mode 100644 index 000000000..0cd47dd93 --- /dev/null +++ b/Completion/ALT/Command/_control_d @@ -0,0 +1,21 @@ +#compdef -p */control.d/facilities/* + +local script + +_compskip=all + +script=$words[1] +[[ $script = */* ]] || script=/etc/control.d/facilities/$script + +local -a modes +modes=( + 'help:Describe available modes' + 'list:List available modes' + 'status:Show current status' + 'summary:Show facility description' +) + +modes+=( "${(f)$($script help 2>/dev/null)}" ) +modes=( "${(@)${(@)modes/:[[:space:]]##/:}%:[[:space:]]#}" ) + +_describe -t control-modes 'control mode' modes "$@" diff --git a/Completion/ALT/Command/_gear b/Completion/ALT/Command/_gear new file mode 100644 index 000000000..48720136d --- /dev/null +++ b/Completion/ALT/Command/_gear @@ -0,0 +1,183 @@ +#compdef gear gear-commit gear-srpmimport gear-update gear-import gear-update-tag gear-merge gear-changelog gear-hsh gear-buildreq gear-rpm + +local curcontext="$curcontext" context state line ret=1 +typeset -A opt_args + +local -a opts_help +opts_help=( + '(-v --verbose -q --quiet)'{-q,--quiet}'[try to be more quiet]' + '(-v --verbose -q --quiet)'{-v,--verbose}'[print a message for each action]' + '(- :)'{-V,--version}'[print program version and exit]' + '(- :)'{-h,--help}'[show usage and exit]' +) + +local -a opts_gear +opts_gear=( + '(-r --rules)'{-r,--rules=}'[name of file with rules]:rules file:_files' + '(-t --tree-ish --commit)'{-t,--tree-ish=}'[tree, commit or tag object name]:tree-ish' + '(-t --tree-ish --commit)--commit[make temporary commit prior to extract]' +) + +local -a opts_gear_compress +opts_gear_compress=( + '(--rpmbuild --export-dir --describe --no-compress --bzip2 --gzip)--no-compress[do not compress output archive]' + '(--rpmbuild --export-dir --describe --no-compress --bzip2 --gzip)--bzip2[compress output archive using bzip2]' + '(--rpmbuild --export-dir --describe --no-compress --bzip2 --gzip)--gzip[compress output archive using gzip]' +) + +local -a opts_gear_update_spec +opts_gear_update_spec=( + '--update-spec[change specfile in repository if specfile changed]' +) + +case "$service" in +(gear) + local -a args + args=(':output tarball:_files') + if (( $words[(I)--(rpmbuild|hasher|command)] )); then + args=($opts_gear_update_spec + '(-):command: _command_names -e' + '*::args: _normal') + elif (( $words[(I)(--export-dir|--describe)] )); then + args=() + fi + + _arguments -S \ + $opts_help \ + $opts_gear \ + $opts_gear_compress \ + '(--rpmbuild --hasher --command --export-dir --describe --no-compress --bzip2 --gzip :)--export-dir=[write source files to specified directory]:directory:_directories' \ + '(--rpmbuild --hasher --command --export-dir --describe)--hasher[execute hsh-like command afterwards]' \ + '(--rpmbuild --hasher --command --export-dir --describe --no-compress --bzip2 --gzip)--rpmbuild[execute rpmbuild-like command afterwards]' \ + '(--rpmbuild --hasher --command --export-dir --describe)--command[execute arbitrary command afterwards]' \ + '(--rpmbuild --hasher --command --export-dir --no-compress --bzip2 --gzip)--describe[describe package as \"%{NAME} %{VERSION} %{RELEASE}\"]' \ + $args && ret=0 + ;; +(gear-commit) + curcontext="${curcontext%:*:*}:git-commit:" + service=git-commit + _arguments -S \ + '--spec=[spec file]:spec file:_files -g "*.spec(-.)"' \ + '*:git-commit option: _git' && ret=0 + ;; +(gear-srpmimport) + _arguments -S \ + $opts_help \ + '--branch=[branch name where to import]:branch' \ + '--import-only[do not perform a checkout after importing]' \ + '--no-untar[do not unpack source tarballs]' \ + '--rules=[name of file with rules]:rules file:_files' \ + '--spec-pattern=[specfile pattern list]:specfile pattern' \ + '(:)--stdin[read source package names from stdin]' \ + '(-)*:source package:_files -g "*.src.rpm"' && ret=0 + ;; +(gear-update) + _arguments -S \ + $opts_help \ + '--exclude=[exclude files matching posix-egrep regular expression]:pattern' \ + '--ignore-exclude[ignore .gitignore and .git/info/exclude]' \ + '(-a --all)'{-a,--all}'[extract all files and directories from archive]' \ + '(-c --create)'{-c,--create}'[create the before unpacking the ]' \ + '(-s --subdir)'{-s,--subdir=}'[extract specified directory name from archive]:directory' \ + '(-t --type)'{-t,--type=}'[define source type]:source type:(dir tar cpio cpio.gz cpio.bz2 zip)' \ + '(-f --force)'{-f,--force}'[remove files from even if untracked or modified files found]' \ + ':source:_files' \ + ':dst-directory:_directories' && ret=0 + ;; +(gear-import) + _arguments -S \ + $opts_help \ + '(-c --commit -t --tag -T --tag-message -s --sign --no-commit --no-tag --dry-run)--dry-run[show parser results and exit]' \ + '(-c --commit -t --tag -T --tag-message -s --sign --no-commit --no-tag --dry-run)--no-commit[do not commit new changes]' \ + '(-t --tag -T --tag-message --no-tag --dry-run)--no-tag[do not add tag]' \ + '--time=[use time described by STR or referenced by FILE]:time string of file:->time-or-file' \ + '--ignore-exclude[pass --ignore-exclude to gear-update]' \ + '(-C --create)'{-C,--create}'[pass --create to gear-update]' \ + '(-f --force)'{-f,--force}'[pass --force to gear-update]' \ + '(--no-commit --dry-run)'{-s,--sign}'[add sign to commit and tag]' \ + '(-S --subdir)'{-S,--subdir=}'[unpack archives into DIR]:directory:_directories' \ + '(--dry-run --no-commit -c --commit)'{-c,--commit}'[use MSG as commit message]:message' \ + '(--dry-run --no-commit --no-tag -t --tag)'{-t,--tag=}'[use NAME as tag name]:tag name' \ + '(--dry-run --no-commit --no-tag -T --tag-message)'{-T,--tag-message=}'[use MSG as tag message]:tag message' \ + '(-r --rules)'{-r,--rules=}'[override import rules file name]:rules file:_files' \ + '*:archive:_files' && ret=0 + ;; +(gear-update-tag) + _arguments -S \ + $opts_help \ + '(-a --all :)'{-a,--all}'[update all tags used in rules]' \ + '(-c --clean --no-clean :)'{-c,--clean}'[delete tags not used in rules]' \ + '(-c --clean --no-clean)--no-clean[]' \ + '(-d --delete :)'{-d,--delete}'[delete the specified tag]:tag name' \ + '(:)--verify[verify all tags used in rules]' \ + '(-r --rules)'{-r,--rules}'[override rules file name]:rules file:_files' \ + '(-):tag name' \ + '(-):tag value' && ret=0 + ;; +(gear-merge) + _arguments -S \ + $opts_help \ + '(-I --no-interactive)'{-I,--no-interactive}'[merge branches non-interactively]' \ + '(-a --add)'{-a,--add}'[add new patches in git repository]' \ + '(-r --rules)'{-r,--rules}'=[name of file with rules]:rules file:_files' \ + '(-s --stop -I --no-interactive)'{-s,--stop}'=[stop merge when BRANCH shows in ]:branch name' \ + '--ignore-changed[do not bail if index changed]' \ + '--ignore-untracked[do not bail if untracked or modified files found]' && ret=0 + ;; +(gear-changelog) + _arguments -S \ + $opts_help \ + '(-r --rules --no-rules)'{-r,--rules}'=[name of a rules file]:rules file:_files' \ + '(-r --rules)--no-rules[do not use rules, write entries without aggregation]' \ + '--no-groups[do not group entries]' \ + '--no-specfile[do not use information from specfile]' \ + '(-f --format)'{-f,--format}'[changelog output format]:format:(rpm gnu deb)' && ret=0 + ;; +(gear-hsh) + _arguments \ + $opts_help \ + $opts_gear \ + $opts_gear_update_spec \ + '*:hasher option:->hasher' && ret=0 + ;; +(gear-buildreq) + _arguments \ + $opts_help \ + $opts_gear \ + $opts_gear_update_spec \ + '*:buildreq option:->buildreq' && ret=0 + ;; +(gear-rpm) + _arguments \ + $opts_help \ + $opts_gear \ + $opts_gear_update_spec \ + '*:rpmbuild option:->rpmbuild' && ret=0 + ;; +esac + +case $state in +(hasher) + curcontext="${curcontext%:*:*}:hsh:" + service=hsh + _call_function ret _hasher + ;; +(buildreq) + curcontext="${curcontext%:*:*}:buildreq:" + service=buildreq + _call_function ret _buildreq + ;; +(rpmbuild) + curcontext="${curcontext%:*:*}:rpmbuild:" + service=rpmb + _call_function ret _rpm + ;; +(time-or-file) + _alternative \ + 'time-string:time string: ' \ + 'files:file:_files' && ret=0 + ;; +esac + +return $ret +# vim: set ft=zsh ts=4 sw=4 sts=4 : diff --git a/Completion/ALT/Command/_girar b/Completion/ALT/Command/_girar new file mode 100644 index 000000000..9b3ae22c9 --- /dev/null +++ b/Completion/ALT/Command/_girar @@ -0,0 +1,40 @@ +#compdef girar-clone girar-import girar-upload + +local curcontext="$curcontext" context state line ret=1 +typeset -A opt_args + +local -a common_opts +common_opts=( + '(-R --remote)'{-R,--remote=}'[girar remote name]:girar remote:_hosts' + '(-v --verbose -q --quiet)'{-q,--quiet}'[try to be more quiet]' + '(-v --verbose -q --quiet)'{-v,--verbose}'[print a message for each action]' + '(- :)'{-V,--version}'[print program version and exit]' + '(- :)'{-h,--help}'[show usage and exit]' +) + +case "$service" in +(girar-clone) + _arguments -S \ + $common_opts \ + ':user:_girar_info users' \ + ':repository:_girar_info directories "/people/${${words[((CURRENT-1))]}%%,*}/"' && ret=0 + ;; +(girar-import) + _arguments -S \ + $common_opts \ + '(-u --update)'{-u,--update}'[update into current repository]' \ + '(-G --gears -S --srpms)'{-G,--gears}'[only try /gears/ hierarchy]' \ + '(-G --gears -S --srpms)'{-S,--srpms}'[only try /srpms/ hierarchy]' \ + ':repository:_girar_info binary-repositories' \ + ':package:_rpm_packages avail' && ret=0 + ;; +(girar-upload) + _arguments -S \ + $common_opts \ + '(-o --origin)'{-o,--origin=}'[git remote name]:git remote' \ + ':repository:' \ + '*:refspec:' && ret=0 + ;; +esac + +return ret diff --git a/Completion/ALT/Command/_girar_remote b/Completion/ALT/Command/_girar_remote new file mode 100644 index 000000000..06e431f74 --- /dev/null +++ b/Completion/ALT/Command/_girar_remote @@ -0,0 +1,278 @@ +#compdef girar-remote + +local -a args reply +args=( + # Command word. Don't care what that is. + /$'[^\0]#\0'/ +) + +local -a charset_args +charset_args=( + /$'[^\0]#\0'/ ':git-repository:path to git repository:_girar_info directories' + /$'[^\0]#\0'/ ':character-set:charset:' +) + +local -a clone_args +clone_args=( + /$'[^\0]#\0'/ ':git-repository:source git repository:_girar_info directories' + /$'[^\0]#\0'/ ':git-directory:destination directory:_girar_info directories' +) + +local -a default_branch_args +default_branch_args=( + /$'[^\0]#\0'/ ':git-repository:git repository:_girar_info directories' + /$'[^\0]#\0'/ ':repository-branch:repository branch:_girar_info repository-branches "${words[((CURRENT-1))]}"' +) + +local -a find_package_args +find_package_args=( + /$'[^\0]#\0'/ ':pattern:search pattern:' +) + +local -a init_db_args +init_db_args=( + /$'((packages|private|public)/)#[A-Za-z0-9][-A-Za-z0-9_.]##\0'/ ':repository-name:repository name:' +) + +local -a ls_args +ls_args=( + /$'[^\0]#\0'/ ':git-directory:girar directory:_girar_info directories' +) + +local -a mv_db_args +mv_db_args=( + /$'[^\0]#\0'/ ':git-repository:source git repository:_girar_info directories' + /$'[^\0]#\0'/ ':git-directory:destination directory:_girar_info directories' +) + +local -a rm_db_args +rm_db_args=( + /$'[^\0]#\0'/ ':git-repository:git repository:_girar_info directories' +) + +local -a login_arg +login_arg=( + /$'[a-z_0-9]##\0'/ ':users:maintainer:_girar_info user' +) + +local -a binary_repo_arg +binary_repo_arg=( + /$'[^\0]#\0'/ ':binary-repository:binary repository:_girar_info binary-repositories' +) + +local -a state_args +state_args=( + /$'(awaiting|building|committing|done|failed|new|pending|tested|ALL)\0'/ + ':state:state:(awaiting building committing done failed new pending tested ALL)' +) + +local -a ALL_arg +ALL_arg=( + /$'ALL\0'/ ':ALL:ALL:(ALL)' +) + +local -a task_ls_args +_regex_words \ + task-ls-args "task ls argument" \ + '--repo:binary repository name:\( $binary_repo_arg \| $ALL_arg \)' \ + '--state:task state:$state_args' \ + '--user:task owner:\( $login_arg \| $ALL_arg \)' +task_ls_args=( "$reply[@]" '#' ) + +local -a task_id_arg +task_id_arg=( + /$'[[:digit:]]##\0'/ ':task-id:task id:_girar_info tasks' +) + +local -a task_any_id_arg +task_any_id_arg=( + /$'[[:digit:]]##\0'/ ':task-id:task id:_girar_info all-tasks' +) + +local -a repo_tag_args +repo_tag_args=( + /$'[A-Za-z0-9][-A-Za-z0-9_.]##\0'/ ':package-repository:package repository:_girar_info package-repositories' + /$'[^\0]##-alt[^\0]##\0'/ ':package-tag:package tag:_girar_info package-tags "${words[((CURRENT-1))]}"' +) + +local -a source_rpm_arg +source_rpm_arg=( + /$'[^\0]##.src.rpm\0'/ ':source-rpm:source rpm:_girar_info srpms' +) + +local -a package_name_arg +package_name_arg=( + /$'[^@\0]##\0'/ ':package-name:package name:' +) + +local -a group_name_arg +group_name_arg=( + /$'@[a-z_0-9]##\0'/ ':group-id:group name:' +) + +local -a task_subtask_id_arg +task_subtask_id_arg=( + /$'[[:digit:]]##\0'/ ':subtask-id:subtask id:_girar_info subtasks "$words[((CURRENT-1))]"' +) + +local -a task_add_subcmd +_regex_words \ + task-add-commands "task add command" \ + 'repo:build from git repository:$repo_tag_args' \ + 'srpm:build source rpm:$source_rpm_arg' \ + 'del:delete package:$package_name_arg' \ + 'copy:copy from another repository:$package_name_arg $binary_repo_arg' +task_add_subcmd=( '(' $task_id_arg '(' $task_subtask_id_arg '|' ')' '|' ')' "$reply[@]") + +local -a task_deps_subcmd +_regex_words \ + task-deps-comands "task deps command" \ + 'show:show deps' \ + 'clear:clear deps' \ + 'add:add deps:\( $task_any_id_arg \) \#' \ + 'del:del deps:\( $task_any_id_arg \) \#' \ + 'set:set deps:\( $task_any_id_arg \) \#' +task_deps_subcmd=( '(' $task_id_arg '|' ')' "$reply[@]" ) + +local -a task_share_args +_regex_words \ + task-share-command "task share command" \ + 'status:show status' \ + 'enabled:share task' \ + 'disabled:unshare task' +task_share_args=( + '(' $task_id_arg '|' ')' + "$reply[@]" +) + +local -a disable_arg +disable_arg=( + /$'disable\0'/ ':disable:disable:(disable)' +) + +local -a commit_sha_arg +commit_sha_arg=( + /$'[^@\0]##\0'/ ':commit:commit sha:' +) + +local -a task_commands +_regex_words \ + task-commands "task command" \ + 'ls:list tasks:$task_ls_args' \ + 'show:show task:\( $task_any_id_arg \| \)' \ + 'new:new task:$binary_repo_arg' \ + 'add:add subtask:$task_add_subcmd' \ + 'delsub:delete subtask:$task_id_arg $task_subtask_id_arg' \ + 'deps:task dependencies:$task_deps_subcmd' \ + 'run:run task:\( $task_id_arg \| \)' \ + 'share:share task:$task_share_args' \ + 'approve:approve subtask:$task_any_id_arg $task_subtask_id_arg' \ + 'rm:delete task:\( $task_id_arg \| \)' \ + 'abort:abort task:\( $task_id_arg \| \)' \ + 'check-git-inheritance:disable git inheritance check:$task_id_arg $task_subtask_id_arg $disable_arg $commit_sha_arg' +task_commands=("$reply[@]") + +local -a build_args +_regex_words \ + build-options "build option" \ + '-b:binary repository name:$binary_repo_arg' \ + '--deps:deps list:$task_any_id_arg' +build_args=( + '(' "$reply[@]" '|' ')' +) +_regex_words \ + build-command "build command" \ + 'srpm:build source rpm:$source_rpm_arg' \ + 'del:delete package:$package_name_arg' \ + 'copy:copy from another repository:$package_name_arg $binary_repo_arg' +build_args+=('(' "$reply[@]" '|' $repo_tag_args ')' '#') + +local -a acl_login_group_arg +acl_login_group_arg=( + '(' + $group_name_arg + '|' + $login_arg + ')' +) + +local -a acl_package_group_arg +acl_package_group_arg=( + '(' + $group_name_arg + '|' + $package_name_arg + ')' +) + +local -a timestamp +timestamp=( + /$'[[:digit:]]##\0'/ ':timestamp:timestamp:' +) + +local -a acl_nmu_cmds +_regex_words \ + acl-nmu-command "acl nmu command" \ + 'show:show nmu status' \ + 'add:add nmu rights:$login_arg $timestamp $timestamp' \ + 'del:delete nmu rights:$login_arg $timestamp $timestamp' +acl_nmu_cmds=("$reply[@]") + +local -a acl_cmds +_regex_words \ + acl-command "acl command" \ + 'nmu:nmu management:$acl_nmu_cmds' \ + 'check:check acl' \ + 'show:show acl' \ + 'add:add acl:\( $acl_login_group_arg \# \)' \ + 'del:delete acl:\( $acl_login_group_arg \# \)' \ + 'leader:set leader:$acl_login_group_arg' \ + 'replace:replace acl:\( $acl_login_group_arg \# \)' +acl_cmds=("$reply[@]") + +local -a acl_list_arg +_regex_words \ + acl-option "acl option" \ + '--list:list binary repositories' +acl_list_arg=("$reply[@]") + +local -a acl_args +acl_args=( + '(' + $acl_list_arg + '|' + $binary_repo_arg + $acl_package_group_arg + $acl_cmds + ')' +) + +local -a remote_arg +remote_arg=( + /$'[^\0]#\0'/ ':host:host:_hosts' +) +_regex_words \ + options "girar-utils option" \ + '-R:remote name:$remote_arg' +args+=( '(' "$reply[@]" '|' ')' ) + +_regex_words \ + commands "girar command" \ + 'help:show girar command reference' \ + 'charset:set default character encoding for repository:$charset_args' \ + 'clone:clone repository:$clone_args' \ + 'default-branch:set default branch:$default_branch_args' \ + 'find-package:search repository:$find_package_args' \ + 'init-db:create new repository:$init_db_args' \ + 'ls:list girar directory:$ls_args' \ + 'mv-db:rename/move repository:$mv_db_args' \ + 'quota:show user quota information' \ + 'rm-db:delete repository:$rm_db_args' \ + 'task:manage tasks:$task_commands' \ + 'build:build package:$build_args' \ + 'acl:manage package access control lists:$acl_args' +args+=("$reply[@]") + +_regex_arguments _girar_remote "${args[@]}" + +_girar_remote "$@" diff --git a/Completion/ALT/Command/_hasher b/Completion/ALT/Command/_hasher new file mode 100644 index 000000000..8ba2b2e58 --- /dev/null +++ b/Completion/ALT/Command/_hasher @@ -0,0 +1,211 @@ +#compdef hsh hsh-install hsh-rebuild hsh-run hsh-shell hsh-copy mkaptbox +# vim: et tw=4 sw=4 + +local curcontext="$curcontext" packages ret=1 +typeset -A opt_args +local -a help_opts common_opts aptbox_opts __repo builder_opts nonsh_opts +local mountpoints_opt +local workdir_arg + +help_opts=( +'(-v --verbose -q --quiet)'{-q,--quiet}'[try to be more quiet]' +'(-v --verbose -q --quiet)'{-v,--verbose}'[print a message for each action]' +'(- :)'{-V,--version}'[print program version and exit]' +'(- :)'{-h,--help}'[show usage and exit]' +) + +# options suitable for /hsh.*/ +common_opts=( +'--hasher-priv-dir=[hasher-priv directory]:hasher-priv:_directories' +'--number=[subconfig identifier]:number' +'--workdir=[workdir]:hasher workdir:_directories' +'(--no-wait-lock)--wait-lock[wait for workdir and hasher-priv locks]' +'(--wait-lock)--no-wait-lock[do not wait for workdir and hasher-priv locks]' +) + +__repo=( +'(--repo,--repo-bin,--repo-src)--repo=[destination repository directory]: :_directories' +'(--repo)--repo-bin=[binary packages destination directory]: :_directories' +'(--repo)--repo-src=[source packages destination directory]: :_directories' +) + +# aptbox-exclusive +aptbox_opts=( +'--apt-config=[path to custom apt.conf file]:apt-config:_files' +'--apt-prefix=[path to apt directory prefix]:apt-prefix:_directories' +$__repo +'--target=[target architecture]:architecture' +) + +mountpoints_opt='--mountpoints=[comma-separated list of known mount points]:mountpoints:' + +# options for hsh, hsh-rebuild +builder_opts=( +'--build-srpm-only[do not build binary packages]' +'--images[image output directory]:_directories' +'--img-apt-config[custom apt.conf for image building]:_files' +'--repo-mountpoints=[comma-separated list of repo mountpoints]:repo mountpoints:' +'--rebuild-prog=[program to run to query for rebuild]:rebuild-prog:_files -g "*(-*)"' +'(--query-req-prog)--query-repackage[repackage the source before query for requirements]' +'(--query-repackage)--query-req-prog=[program to run to query for requirements]:query-req-prog:_files -g "*(-*)"' +$__repo +'--target=[target architecture]:architecture: ' +) + +# options for non-runners: hsh, -install, -rebuild +nonsh_opts=( +'--excludedocs[do not install documentation files]' + +) + +no_sis_check_opts=( +'(--no-sisyphus-check'{,-in,-out}')--no-sisyphus-check-in=[do not run sisyphus_check input tests]::sisyphus_check tests:_sisyphus_check_tests' +'(--no-sisyphus-check'{,-in,-out}')--no-sisyphus-check=[do not run sisyphus_check tests]::sisyphus_check tests:_sisyphus_check_tests' +'(--no-sisyphus-check'{,-in,-out}')--no-sisyphus-check-out=[do not run sisyphus_check output tests]::sisyphus_check tests:_sisyphus_check_tests' +) + +srcrpm_or_pkgtar='"*.(src.rpm|tar)"' + +# New tools do not support the positional workdir argument. +case "$service" in + hsh-copy) + workdir_arg='' ;; + *) + workdir_arg='::workdir:_directories' + ;; +esac + +case "$service" in + hsh) + if (( $words[(I)--(initroot|cleanup)-only] )); then + packages= + else + packages='*:source package:_files -g '"$srcrpm_or_pkgtar" + fi + # TODO: replace --args and --build-args with --rpmbuild-args on completion attempt, + # possibly -M 'm:--build-args=--rpmbuild-args r:|[_-]=* r:|=*' + _arguments -S \ + $help_opts \ + $common_opts \ + $builder_opts \ + $nonsh_opts \ + $aptbox_opts \ + '--'{rpm,}'build-args=[extra arguments for rpmbuild]:rpmbuild args:' \ + '--cache-compress[specify executable to compress cache with]:_normal -e' \ + '--cache-dir[specify alternative cache directory]:_directories' \ + '(--initroot-only)--cleanup-only[do not build at all, just cleanup workdir]' \ + '--eager-cleanup[cleanup build environment after each successful build]' \ + '--lazy-cleanup[cleanup build environment before each new build]' \ + '(--cleanup-only)--initroot-only[do not build, stop after initroot stage]' \ + '--install-langs=[colon-separated list of languages to install]:languages' \ + $mountpoints_opt \ + '--no-cache[do not use initroot cache]' \ + '--no-contents-indices[do not use content indices]' \ + '(--repackage-source)--no-repackage-source[do not repackage source along with binaries]' \ + $no_sis_check_opts \ + '--nprocs=[number of CPUs to use]:number' \ + '--packager=[override default RPM packager tag]:packager:' \ + '--predb-prog=[program to run before rpmi --justdb]:predb-prog:_files -g "*(-*)"' \ + '--printenv[show configuration environment variables]' \ + '--pkg-build-list=[override default build package file list]:packages' \ + '--pkg-init-list=[override default initial package file list]:packages' \ + '(--no-repackage-source)--repackage-source[repackage source along with binaries]' \ + '--save-fakeroot[save fakeroot state]' \ + '(--with-stuff)--without-stuff[do not use built packages]' \ + '(--without-stuff)--with-stuff[allow use of built packages]' \ + "$workdir_arg" \ + $packages && ret=0 + ;; + hsh-install) + _arguments -S \ + $help_opts \ + $common_opts \ + $nonsh_opts \ + $mountpoints_opt \ + "$workdir_arg" \ + '*:package name' && ret=0 + ;; + hsh-rebuild) + _arguments -S \ + $help_opts \ + $common_opts \ + $builder_opts \ + $nonsh_opts \ + '--'{rpmbuild-,}'args=[extra arguments for rpmbuild]: : ' \ + '--install-only[do not build, stop after installing build dependencies]' \ + $mountpoints_opt \ + '--nodeps[ignore package dependencies (dangerous)]' \ + $no_sis_check_opts \ + '--source-only[do not build, stop after installing source package]' \ + '(--with-stuff)--without-stuff[do not generate apt index files]' \ + '(--without-stuff)--with-stuff[generate apt index files]' \ + "$workdir_arg" \ + ':source package:_files -g '"$srcrpm_or_pkgtar" && ret=0 + ;; + hsh-run|hsh-shell) + _arguments -S \ + $help_opts \ + $common_opts \ + '(--rooter)--builder[run program as builder]' \ + '--execute=[copy given script to workdir and execute it]:script:_files' \ + $mountpoints_opt \ + '--pty[redirect standard descriptors to controlling pty]' \ + '(--builder)--rooter[run program as pseudoroot]' \ + '--shell=[run a custom interactive shell]::shell:_files -g "*(-*)"' \ + '--x11-timeout=[how long X11 authorization will be valid]:seconds' \ + '(-x -X -Y)-x[disable X11 forwarding]' \ + '(-x -X -Y)-X[enable X11 forwarding]' \ + '(-x -X -Y)-Y[enable trusted X11 forwarding]' \ + "$workdir_arg" \ + '*::command:= _normal -e' && ret=0 + ;; + hsh-copy) + _arguments -C -S \ + $help_opts \ + $common_opts \ + '(--rooter)--builder[assume builder]' \ + '(--builder)--rooter[assume pseudoroot]' \ + ':source:_files' \ + '*: :->dest-or-sources' && ret=0 + + case $state in + dest-or-sources) + local -a specs=( + 'files:source:_files' + ) + + local def_dest_prefix + local workdir=${~opt_args[--workdir]} + if [[ -z "$workdir" ]]; then + # The hasher project CLI assumes ~/hasher as the default workdir. + workdir="$HOME/hasher" + fi + def_dest_prefix="$(realpath -q -e -- $workdir/chroot)" + if [[ -d "$def_dest_prefix" ]]; then + local home="/usr/src" + [[ "${words[(I)--builder]}" -ge "${words[(I)--rooter]}" ]] || home="/root" + def_dest_prefix="$def_dest_prefix$home" + local def_dest_action="_files -W ${(q)def_dest_prefix}" + specs+=( 'destination-files:destination:'"$def_dest_action" ) + else + _message 'no valid destinations in workdir' + fi + _alternative "${(@)specs}" + ;; + esac + ;; + mkaptbox) + _arguments -S \ + $help_opts \ + $aptbox_opts \ + '(-f --force)'{-f,--force}'[force aptbox creation]' \ + '(-u --update)--no-update[do not run "apt-get update" after creation]' \ + '(-u --update --no-update)'{-u,--update}'[run "apt-get update" after creation]' \ + '(--with-stuff)--without-stuff[do not configure sources.list for the work repository]' \ + '(--without-stuff)--with-stuff[configure sources.list for the work repository]' \ + ':workdir:_directories' && ret=0 + ;; + + esac + + return $ret diff --git a/Completion/ALT/Command/_sisyphus_check b/Completion/ALT/Command/_sisyphus_check new file mode 100644 index 000000000..b3d0e1d97 --- /dev/null +++ b/Completion/ALT/Command/_sisyphus_check @@ -0,0 +1,29 @@ +#compdef sisyphus_check + +local curcontext="$curcontext" context state line ret=1 + +local -a opts_help +opts_help=( + '(-v --verbose -q --quiet)'{-q,--quiet}'[try to be more quiet]' + '(-v --verbose -q --quiet)'{-v,--verbose}'[print a message for each action]' + '(- :)'{-h,--help}'[show usage and exit]' +) + +local -a args +args=('*:directory:_directories') +if (( $words[(I)--files] )); then + args=('*:package:_files -g "*.rpm"') +fi + +_arguments -S \ + $opts_help \ + '--fast-check[stop checking after first error]' \ + '(--files --directories)--files[treat as a packages]' \ + '(--files --directories)--directories[treat as a directory]' \ + '--recursive[search packages recursively]' \ + '--show-bad-files[print bad packages]' \ + '--trust-gpg-names=[change the list of trusted gpg names]::' \ + '--'{no-,}'check=[change the list of checks]::sisyphus_check tests:_sisyphus_check_tests' \ + $args && ret=0 + +return $ret diff --git a/Completion/ALT/Type/.distfiles b/Completion/ALT/Type/.distfiles new file mode 100644 index 000000000..9a8e64fb9 --- /dev/null +++ b/Completion/ALT/Type/.distfiles @@ -0,0 +1,5 @@ +DISTFILES_SRC=' +.distfiles +_girar_info +_sisyphus_check_tests +' diff --git a/Completion/ALT/Type/_girar_info b/Completion/ALT/Type/_girar_info new file mode 100644 index 000000000..adf000cd0 --- /dev/null +++ b/Completion/ALT/Type/_girar_info @@ -0,0 +1,149 @@ +#autoload + +__girar_command() +{ + local cmd tag remote idx + + remote=() + idx=${words[(I)-R|-remote|--remote=*]} + (( idx )) && case ${words[$idx]} in + (-R|--remote) remote=(-R "${words[((idx+1))]}");; + (--remote=*) remote=(-R "${${words[$idx]}#--remote=}");; + esac + + if zstyle -s ":completion:${curcontext}:${1}" command cmd || + cmd="$2" + + "$cmd" "$remote[@]" "${@[3,-1]}" +} + +_girar_info-directories() +{ + local expl + local -a remfiles + + if compset -P '?*/'; then + remfiles=(${${${${${${${(M)${${(f)"$(__girar_command package-repository girar-remote ls $1${words[CURRENT]%/*})"}:#total *}:#d*}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}) + elif compset -P /; then + remfiles=(people archive gears) + else + remfiles=(${${${${${${${(M)${${(f)"$(__girar_command package-repository girar-remote ls $1)"}:#total *}:#d*}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}) + fi + + _wanted files expl 'girar directories' \ + compadd -S/ -q -- "$remfiles[@]" +} + +_girar_info-tasks() +{ + local -a tasks + + tasks=(${${${${(f)"$(__girar_command task-id girar-remote task ls --repo=ALL --state=ALL)"}#\#}//:/\\:}/ /:}) + _describe -t task-id 'task id' tasks -V tasks +} + +_girar_info-all-tasks() +{ + local -a tasks + + tasks=(${${${${(f)"$(__girar_command any-task-id girar-remote task ls --repo=ALL --state=ALL --user=ALL)"}#\#}//:/\\:}/ /:}) + _describe -t any-task-id 'task id' tasks -V tasks +} + +_girar_info-subtasks() +{ + local -a subtasks + + # Assumes that task id comes right before subtask id + subtasks=(${(M)${${(f)"$(__girar_command subtask-id girar-remote task show --brief "$@")"}# }:#<->*}) + _describe -t subtask-id 'subtask id' subtasks -V subtasks +} + +_girar_info-binary-repositories() +{ + local -a repos + + repos=( ${(f)"$(__girar_command binary-repository girar-remote acl --list)"} ) + _describe -t binary-repository 'binary repository' repos -V repos +} + +_girar_info-package-repositories() +{ + local -a repos + + repos=( ${${${${${${${${(M)${${(f)"$(__girar_command package-repository girar-remote ls packages)"}:#total *}:#d*}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}%.git} ) + _describe -t package-repository 'package repository' repos +} + +_girar_info-package-tags() +{ + local uri pattern + local -a tags + + if zstyle -s ":completion:${curcontext}:package-tag" tag-pattern pattern || + pattern="*-alt*" + + uri="$(__girar_command uri girar-remote-uri "$@")" + tags=( ${(M)${${${${(f)"$(_call_program package-tag git ls-remote -t "$uri")"}:#*\^\{\}}##* }#refs/tags/}:#$~pattern} ) + _describe -t package-tag 'package tag' tags -V tags +} + +_girar_info-repository-branches() +{ + local uri + local -a tags + + uri="$(__girar_command uri girar-remote-uri "$@")" + branches=( ${${${(f)"$(_call_program package-tag git ls-remote -h "$uri")"}##* }#refs/heads/} ) + _describe -t repository-branch 'repository branch' branches +} + +_girar_info-srpms() +{ + local -a srpms + + srpms=( ${${${${${${${${(M)${${(f)"$(__girar_command source-rpm girar-remote ls incoming)"}:#total *}:#*.src.rpm}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}%.git} ) + _describe -t source-rpm 'source rpm' srpms +} + +_girar_info-user() +{ + local expl + local -a remusers + + remusers=(${${${${${${${(M)${${(f)"$(__girar_command users girar-remote ls /people)"}:#total *}:#d*}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}) + + _wanted users expl 'girar users' \ + compadd -- "$remusers[@]" +} + +_girar_info-users() +{ + local expl + local -a remusers + + remusers=(${${${${${${${(M)${${(f)"$(__girar_command users girar-remote ls /people)"}:#total *}:#d*}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}##[^ ]## ##}) + + _wanted users expl 'girar users' \ + compadd -S, -q -- "$remusers[@]" +} + +_girar_info() +{ + local what ret + local -a expl + + zparseopts -D -a expl q n 1 2 P: S: r: R: W: X+: M+: F: J+: V+: + + what="$1" + [[ "$what" = (directories|tasks|all-tasks|subtasks|binary-repositories|package-repositories|package-tags|repository-branches|srpms|user|users) ]] || { + _message "unknown command: $what" + return + } + + _call_function ret _girar_info-$what "${@[2,-1]}" + + return ret +} + +_girar_info "$@" diff --git a/Completion/ALT/Type/_sisyphus_check_tests b/Completion/ALT/Type/_sisyphus_check_tests new file mode 100644 index 000000000..1dce296c8 --- /dev/null +++ b/Completion/ALT/Type/_sisyphus_check_tests @@ -0,0 +1,33 @@ +#autoload + +_sisyphus_check_tests () { + local expl tests + + tests=( + '(buildhost buildtime changelog content deps description dirlist fhs gpg group intersects libtool locales nvr packager perms pkgconfig printable subdirs summary)all[all tests]' + '(all)buildhost' + '(all)buildtime' + '(all)changelog' + '(all)content' + '(all)deps' + '(all)description' + '(all)dirlist' + '(all)fhs' + '(all)gpg' + '(all)group' + '(all)intersects' + '(all)libtool' + '(all)locales' + '(all)nvr' + '(all)packager' + '(all)perms' + '(all)pkgconfig' + '(all)printable' + '(all)subdirs' + '(all)summary' + ) + + _values -s , 'tests' "$tests[@]" +} + +_sisyphus_check_tests "$@" diff --git a/Completion/Debian/Command/_apt b/Completion/Debian/Command/_apt index 494d3bf82..89ba9c76e 100644 --- a/Completion/Debian/Command/_apt +++ b/Completion/Debian/Command/_apt @@ -1,6 +1,8 @@ #compdef apt apt-get apt-cache apt-cdrom apt-config apt-mark _apt () { + local deb=deb + [ -f /etc/debian_version ] || deb=rpm case "$service" in apt) _apt-cmd "$@";; apt-get) _apt-get "$@";; @@ -401,31 +403,31 @@ _apt-cmd () { -- \ /$'list\0'/ \( \ \( \ - /$'--installed\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# /'[]'/ \| \ + /$'--installed\0'/ ':packages::_${deb}_packages "$expl_packages[@]" installed' \# /'[]'/ \| \ // %-% /$'--[^\0]#\0'/ ':options:option:(--installed --upgradable --all-versions)' \ \| \) \ - /$'[^-\0][^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \ + /$'[^-\0][^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \ \) \| \ /$'search\0'/ /$'[^\0]#\0'/ ':strings:pattern:' \| \ - /$'showsrc\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ - /$'show\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ - /$'depends\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ - /$'rdepends\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ - /$'policy\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ + /$'showsrc\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ + /$'show\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ + /$'depends\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ + /$'rdepends\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ + /$'policy\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ /$'update\0'/ \| \ \( \ /$'(install|download|source|build-dep)\0'/ -'subcmd=${match%?}' \ - /$'[^\0]#\0'/ ':packages::_deb_packages -qr "\n\t\- /=+-" "$expl_packages[@]" avail' \# \ + /$'[^\0]#\0'/ ':packages::_${deb}_packages -qr "\n\t\- /=+-" "$expl_packages[@]" avail' \# \ \( \ - // '%(.|)/%' -'[[ $subcmd = install ]]' /'[]'/ ':files: :_deb_files -c' \| \ + // '%(.|)/%' -'[[ $subcmd = install ]]' /'[]'/ ':files: :_${deb}_files -c' \| \ /$'[^\0/=]#\/'/ /'[]'/ ':apt-releases:release name:_apt_releases' \| \ /$'[^\0/=]#='/ /'[]'/ ':apt-package-versions:package version:_apt_versions_of_binary_package' \| \ \) \ \) \| \ - /$'(remove|reinstall|purge)\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ + /$'(remove|reinstall|purge)\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" installed' \# \| \ /$'upgrade\0'/ \| \ /$'autoclean\0'/ \| \ - /$'changelog\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ + /$'changelog\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ /$'autoremove\0'/ \| \ /$'full-upgrade\0'/ \| \ /$'dist-upgrade\0'/ \| \ @@ -481,25 +483,27 @@ _apt-get () { /$'upgrade\0'/ \| \ \( \ /$'install\0'\|$'download\0'\|$'source\0'\|$'build-dep\0'/ \ - /$'[^\0]#\0'/ ':packages::_deb_packages -qr "\n\t\- /=" "$expl_packages[@]" avail' \# \ + /$'[^\0]#\0'/ ':packages::_${deb}_packages -qr "\n\t\- /=" "$expl_packages[@]" avail' \# \ \( \ /$'[^\0/=]#/'/ /'[]'/ ':apt-releases:release name:_apt_releases' \| \ /$'[^\0/=]#='/ /'[]'/ ':apt-package-versions:package version:_apt_versions_of_binary_package' \ \) \ \) \| \ - /$'remove\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ - /$'purge\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ + /$'reinstall\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" installed' \# \| \ + /$'remove\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" installed' \# \| \ + /$'purge\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" installed' \# \| \ /$'dist-upgrade\0'/ \| \ /$'dselect-upgrade\0'/ \| \ /$'clean\0'/ \| \ /$'autoclean\0'/ \| \ - /$'changelog\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ /$'check\0'/ \| \ - /$'autoremove\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ + /$'source\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ + /$'build-dep\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ + /$'autoremove\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" installed' \# \| \ /$'help\0/' \| \ - /$'markauto\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ - /$'unmarkauto\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ - /"[]"/ ':argument-1::compadd "$expl_action[@]" update upgrade install remove purge dist-upgrade dselect-upgrade clean autoclean changelog check source build-dep autoremove help markauto unmarkauto download' + /$'markauto\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" installed' \# \| \ + /$'unmarkauto\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" installed' \# \| \ + /"[]"/ ':argument-1::compadd "$expl_action[@]" update upgrade install reinstall remove purge dist-upgrade dselect-upgrade clean autoclean check source build-dep autoremove help markauto unmarkauto' _apt-get () { local expl_action expl_packages @@ -533,21 +537,21 @@ _apt-cache () { /$'help\0'/ \| \ /$'add\0'/ /$'[^\0]#\0'/ ':files:index file:_files' \# \| \ /$'gencaches\0'/ \| \ - /$'showpkg\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ - /$'showsrc\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ + /$'showpkg\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ + /$'showsrc\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ /$'stats\0'/ \| \ /$'dump\0'/ \| \ /$'dumpavail\0'/ \| \ /$'unmet\0'/ \| \ /$'search\0'/ /$'[^\0]#\0'/ ':strings:pattern:' \| \ - /$'show\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ - /$'depends\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ - /$'rdepends\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ + /$'show\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ + /$'depends\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ + /$'rdepends\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ /$'pkgnames\0'/ /$'[^\0]#\0'/ ':strings:prefix:' \| \ - /$'dotty\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ - /$'xvcg\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ - /$'policy\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ - /$'madison\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \ + /$'dotty\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ + /$'xvcg\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ + /$'policy\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ + /$'madison\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" avail' \# \| \ /"[]"/ ':argument-1::compadd "$expl_action[@]" help add gencaches showpkg showsrc stats dump dumpavail unmet search show depends rdepends pkgnames dotty policy xvcg madison' _apt-cache () { @@ -691,13 +695,13 @@ _apt-mark () { -qq:bool \ -s:bool \ -- \ - /$'auto\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ - /$'manual\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ - /$'hold\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ - /$'unhold\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ - /$'showauto\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ - /$'showmanual\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ - /$'showhold\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \ + /$'auto\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" installed' \# \| \ + /$'manual\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" installed' \# \| \ + /$'hold\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" installed' \# \| \ + /$'unhold\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" installed' \# \| \ + /$'showauto\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" installed' \# \| \ + /$'showmanual\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" installed' \# \| \ + /$'showhold\0'/ /$'[^\0]#\0'/ ':packages::_${deb}_packages "$expl_packages[@]" installed' \# \| \ /"[]"/ ':argument-1::compadd "$expl_action[@]" auto manual hold unhold showauto showmanual showhold' _apt-mark () { diff --git a/Completion/Debian/Command/_aptitude b/Completion/Debian/Command/_aptitude index 5b10adb80..ae51dde1a 100644 --- a/Completion/Debian/Command/_aptitude +++ b/Completion/Debian/Command/_aptitude @@ -2,6 +2,8 @@ local curcontext="$curcontext" sep ret=1 local state line expl specs disp cmds suf +local deb=deb +[ -f /etc/debian_version ] || deb=rpm _arguments -C \ '(- 1 *)'{-h,--help}'[display help information]' \ @@ -60,7 +62,7 @@ case $state in aptitude-releases) releases=( ${${(M)${(f)"$( @@ -362,8 +361,6 @@ newptycmd(char *nam, char *pname, char **args, int echo, int nblock) if (get_pty(0, &slave)) exit(1); - SHTTY = slave; - attachtty(mypid); #ifdef TIOCGWINSZ /* Set the window size before associating with the terminal * * so that we don't get hit with a SIGWINCH. I'm paranoid. */ @@ -843,7 +840,7 @@ bin_zpty(char *nam, char **args, Options ops, UNUSED(int func)) zwarnnam(nam, "pty command name already used: %s", *args); return 1; } - return newptycmd(nam, *args, args + 1, OPT_ISSET(ops,'e'), + return newptycmd(nam, *args, args + 1, OPT_ISSET(ops,'e'), OPT_ISSET(ops,'b')); } else { Ptycmd p; diff --git a/Src/Zle/complete.mdd b/Src/Zle/complete.mdd index 77e33504d..0e3c30a26 100644 --- a/Src/Zle/complete.mdd +++ b/Src/Zle/complete.mdd @@ -1,7 +1,7 @@ name=zsh/complete link=either load=yes -functions='Completion/*comp* Completion/AIX/*/* Completion/BSD/*/* Completion/Base/*/* Completion/Cygwin/*/* Completion/Darwin/*/* Completion/Debian/*/* Completion/Linux/*/* Completion/Mandriva/*/* Completion/Redhat/*/* Completion/Solaris/*/* Completion/openSUSE/*/* Completion/Unix/*/* Completion/X/*/* Completion/Zsh/*/*' +functions='Completion/*comp* Completion/AIX/*/* Completion/ALT/*/* Completion/BSD/*/* Completion/Base/*/* Completion/Cygwin/*/* Completion/Darwin/*/* Completion/Debian/*/* Completion/Linux/*/* Completion/Mandriva/*/* Completion/Redhat/*/* Completion/Solaris/*/* Completion/Unix/*/* Completion/X/*/* Completion/Zsh/*/*' moddeps="zsh/zle" diff --git a/zcfg/zlerc b/zcfg/zlerc new file mode 100644 index 000000000..092562f30 --- /dev/null +++ b/zcfg/zlerc @@ -0,0 +1,77 @@ +# +# ALT Linux zle configuration file (zsh(1) key bindings). +# In sync with /etc/inputrc (libreadline configuration). +# This file is sourced from /etc/zshrc. +# + +[[ -o zle ]] && zmodload -i zsh/zle || return + +bindkey -d # reset +# bindkey -v # vi key bindings +bindkey -e # emacs key bindings + +# Keyboard configuration +bindkey "\e[2~" quoted-insert # Insert +bindkey "\e[3~" delete-char # Suppr +bindkey "\e[1~" beginning-of-line # Home +bindkey "\e[4~" end-of-line # End +bindkey "\e[5~" up-line-or-history # Previous +bindkey "\e[6~" down-line-or-history # Next + +# those two are for rxvt +bindkey "\e[7~" beginning-of-line +bindkey "\e[8~" end-of-line + +# some xterms, freebsd console +bindkey "\e[H" beginning-of-line +bindkey "\e[F" end-of-line + +# on some exotic xterms +bindkey "\eOH" beginning-of-line +bindkey "\eOF" end-of-line +bindkey "\eOd" backward-word +bindkey "\eOc" forward-word + +# on nxterms +bindkey "\e[\C-@" beginning-of-line +bindkey "\e[e" end-of-line + +#if [ "${TERM%%-*}" = xterm ]; then +# +# Application keypad and cursor of xterm +# with NumLock ON +# +# Operators +bindkey -s "\eOo" "/" +bindkey -s "\eOj" "*" +bindkey -s "\eOm" "-" +bindkey -s "\eOk" "+" +bindkey -s "\eOl" "+" +bindkey "\eOM" accept-line + +# Colon and dot +# bindkey -s "\eOl" "," +bindkey -s "\eOn" "." + +# Numbers +bindkey -s "\eOp" "0" +bindkey -s "\eOq" "1" +bindkey -s "\eOr" "2" +bindkey -s "\eOs" "3" +bindkey -s "\eOt" "4" +bindkey -s "\eOu" "5" +bindkey -s "\eOv" "6" +bindkey -s "\eOw" "7" +bindkey -s "\eOx" "8" +bindkey -s "\eOy" "9" + +#fi + +# +# Application keypad and cursor of xterm +# +bindkey "\eOD" backward-char +bindkey "\eOC" forward-char +bindkey "\eOA" up-line-or-history +bindkey "\eOB" down-line-or-history +# bindkey -s "\eOE" "" diff --git a/zcfg/zlogout b/zcfg/zlogout new file mode 100644 index 000000000..9ecba84ad --- /dev/null +++ b/zcfg/zlogout @@ -0,0 +1,16 @@ +# +# ALT Linux zlogout configuration file for zsh(1). +# This file is run when an interactive session ends. +# Place custom options into ~/.zlogout. +# + +if [ "${TERM-}" = linux ]; then + case "$TTY" in + /dev/tty[0-9]*|/dev/vc/*|/dev/xvc*) + # Historically some VT environments on ALT Linux did + # not reset the VT on logout. To be fair, nowadays + # they should; still, we're leaning on the safe side, + # just as bash does as of 2021-02-27. + clear ;; + esac +fi diff --git a/zcfg/zprofile b/zcfg/zprofile new file mode 100644 index 000000000..b96c88b19 --- /dev/null +++ b/zcfg/zprofile @@ -0,0 +1,11 @@ +# +# ALT Linux zprofile configuration file for zsh(1). +# This file is sourced in login shell only. +# + +# Load essential files: +emulate sh +[ -f /etc/profile ] && . /etc/profile +[ -f "$HOME"/.profile ] && . "$HOME"/.profile + +emulate zsh diff --git a/zcfg/zshenv b/zcfg/zshenv new file mode 100644 index 000000000..6087e0b0e --- /dev/null +++ b/zcfg/zshenv @@ -0,0 +1,10 @@ +# +# ALT Linux zshenv configuration file for zsh(1). +# This file is sourced on all invocations of the shell. +# This file should not contain commands that product output or assume the shell is attached to a tty. +# Place custom options into ~/.zshenv. +# + +# Secure TMPDIR and set TMPPREFIX according to TMPDIR. +[ -f /etc/profile.d/tmpdir.sh ] && . /etc/profile.d/tmpdir.sh && + TMPPREFIX="${TMPDIR:-/tmp}/zsh" diff --git a/zcfg/zshrc b/zcfg/zshrc new file mode 100644 index 000000000..b69ad3b2d --- /dev/null +++ b/zcfg/zshrc @@ -0,0 +1,51 @@ +# +# ALT Linux zshrc configuration file for zsh(1). +# This file is sourced in interactive mode only. +# For feature-rich sample zshrc, see /usr/share/doc/zsh-*/zshrc. +# Place custom options into ~/.zshrc. +# + +# Load keyboard bindings. +[ -f /etc/zlerc ] && . /etc/zlerc + +# Set prompts +PROMPT="%n@%m %3~ %(!.#.$) " # default prompt + +# history options +HISTFILE="${ZDOTDIR:-$HOME}/.zsh_history" +HISTSIZE=11111 +SAVEHIST=9999 + +# more history options; this makes history more convenient +setopt INC_APPEND_HISTORY +setopt HIST_IGNORE_ALL_DUPS +setopt HIST_SAVE_NO_DUPS +setopt HIST_REDUCE_BLANKS + +# Completion functions +autoload -U compinit && compinit + +# Cache for _rpm_packages, _perl_modules, etc. +zstyle ':completion:*' use-cache on + +# To complete package names for rpm -q: +# zstyle ':completion::complete:rpm*:*:packages' command rpm -qa '--qf=%{name}\\n' + +# To complete build mode related rpmbuild options for rpm: +# zstyle ':completion::complete:rpm:*:options' build-modes true + +# Set sudo's command-path to it's real command search path. +zstyle ':completion:*:sudo:*' command-path /sbin /usr/sbin /usr/local/sbin /bin /usr/bin /usr/local/bin + +() { +local f +integer fret +setopt localoptions extendedglob +[[ -n /etc/zshrc.d/*.zsh(#qN) ]]; fret=$? +unsetopt extendedglob +(( fret )) || for f in /etc/zshrc.d/*.zsh; do + if [ -r "$f" ]; then + . "$f" + fi +done +} diff --git a/zsh.spec b/zsh.spec new file mode 100644 index 000000000..a7ddd3617 --- /dev/null +++ b/zsh.spec @@ -0,0 +1,665 @@ +Name: zsh +Version: 5.9 +Release: alt2 +Epoch: 1 + +Summary: A shell with lots of features +License: ALT-Zsh +Group: Shells + +Url: http://www.zsh.org +Source: %name-%version.tar +Patch: zsh-%version-%release.patch +Patch5: alt-packaging-0001-compaudit-fix-zsh-executable-discovery-if-proc-missing.patch + +Patch101: alt-rpm-0001-_rpm-complete-q-lastchange.patch +Patch102: alt-rpm-0002-_rpm-optionally-complete-rpm-ba-and-similar.patch + +Provides: zsh-doc = %epoch:%version +Obsoletes: zsh-doc < %epoch:%version + +# Automatically added by buildreq on Thu Jan 16 2014 +# optimized out: gnu-config groff-base less libncurses-devel libtinfo-devel makeinfo +BuildRequires: libcap-devel libgdbm-devel libncursesw-devel libpcre-devel man yodl makeinfo + +# For make check +BuildRequires(pre): /dev/pts +# For the egrep progs in %%check. +BuildRequires(pre): /proc +BuildRequires: psmisc + +%description +Zsh is a UNIX command interpreter (shell) usable as an interactive +login shell and as a shell script command processor. Of the standard +shells, zsh most closely resembles ksh but includes many enhancements. +Zsh has command-line editing, built-in spelling correction, programmable +command completion, shell functions (with autoloading), a history +mechanism, and a lots of other features. + +%prep +%setup +%patch -p1 +%patch5 -p1 +%patch101 -p1 +%patch102 -p1 +rm config.guess config.sub + +%build +%autoreconf + +# Disable libnsl/NIS support. +export ac_cv_search_yp_all=no zsh_cv_sys_nis=no zsh_cv_sys_nis_plus=no + +# YODL is not required, pre-generated man pages are shipped. +export YODL=yodl PDFETEX=pdfetex TEXI2PDF=texi2pdf + +# Avoid autoconf thinking it should strip when linking. +export LDFLAGS= + +# Use getcwd(3). +export zsh_cv_use_getcwd=yes + +%configure \ + --enable-cflags="%optflags" \ + --enable-etcdir=%_sysconfdir \ + --enable-fndir=%_datadir/zsh \ + --enable-scriptdir=%_datadir/zsh/scripts \ + --enable-site-fndir=/usr/local/share/zsh \ + --enable-site-scriptdir=/usr/local/share/zsh/scripts \ + --enable-additional-fpath=%_datadir/zsh/site-functions \ + --enable-function-subdirs \ + --enable-maildir-support \ + --with-curses-terminfo \ + --with-tcsetpgrp \ + --enable-cap \ + --enable-pcre \ + --enable-multibyte \ + %{?_enable_debug: --enable-zsh-{,mem-,hash-}debug } \ + %{?_enable_debug: --enable-zsh-{mem-warning,secure-free} } \ + # + +# We don't expect that something is broken. +grep '^#define.*BROKEN' config.h && exit 1 + +%make_build MODDIR=%_libdir all info +%make_build MODDIR=%_libdir -C Etc + +%install +# That script hardcodes the locale for col(1). Sad! +sed -i "/LANG/s/'C'/'C.UTF-8'/" Util/helpfiles + +%makeinstall_std MODDIR=%_libdir install.info + +# Relocate to /bin. +mkdir -p %buildroot/bin +mv %buildroot%_bindir/zsh %buildroot/bin/zsh +ln -s "$(relative /bin/zsh %_bindir/zsh)" %buildroot%_bindir/zsh + +# Configuration files. +mkdir -p %buildroot%_sysconfdir/zshrc.d +for f in zshenv zprofile zshrc zlerc zlogout; do + install -p -m644 zcfg/$f %buildroot%_sysconfdir/$f +done + +# Fix paths. +find %buildroot%_datadir/zsh -type f -print0 | + xargs -r0 grep -FZl /usr/local/bin/zsh | + xargs -r0 subst -p s:/usr/local/bin/zsh:/bin/zsh:g + +# Resolve absolute path of zsh binary in compaudit to power Patch5. +find %buildroot%_datadir/zsh -type f -name compaudit -print0 | + xargs -r0 -n1 sed -i s:@packaged_zsh_executable@:%_bindir/zsh: + +# Drop useless crap +rm -f %buildroot%_datadir/zsh/Completion/Linux/_rpmbuild + +%check +# Tests use egrep/fgrep and ensure standard error contents are fixed. +mkdir -p %_tmppath/progs +cat >%_tmppath/progs/egrep <>%_tmppath/progs/log-egrep-calls +exec grep -E "\$@" +EOF +chmod +x %_tmppath/progs/egrep +cat >%_tmppath/progs/fgrep <>%_tmppath/progs/log-fgrep-calls +exec grep -F "\$@" +EOF +chmod +x %_tmppath/progs/fgrep +PATH="%_tmppath/progs:$PATH" make check + +if [ -r %_tmppath/progs/log-egrep-calls ]; then +echo '-- `make check` has called egrep the following amount of times:' +cat %_tmppath/progs/log-egrep-calls +fi +if [ -r %_tmppath/progs/log-fgrep-calls ]; then +echo '-- `make check` has called fgrep the following amount of times:' +cat %_tmppath/progs/log-fgrep-calls +fi + +%files +/bin/zsh +%_bindir/zsh +%_libdir/zsh/ +%_datadir/zsh/ +%config(noreplace) %_sysconfdir/z*[a-z] +%_man1dir/zsh*.* +%_infodir/zsh.info* +%doc LICENCE META-FAQ NEWS README StartupFiles/z* +%doc Etc/BUGS Etc/CONTRIBUTORS Etc/FAQ Etc/STD-TODO Etc/TODO + +%changelog +* Fri Aug 25 2023 Arseny Maslennikov 1:5.9-alt2 +- _hasher: complete `hsh --predb-prog`. + +* Wed Apr 26 2023 Arseny Maslennikov 1:5.9-alt1 +- 5.8.1 -> 5.9. +- New patch: + + _rpm: optionally complete `rpm -ba` and similar + +* Sat Jun 18 2022 Arseny Maslennikov 1:5.8.1-alt2 +- Fixed ftbfs (egrep/fgrep warnings in test suite). + +* Sat Feb 12 2022 Arseny Maslennikov 1:5.8.1-alt1 +- 5.8 -> 5.8.1. +- Fixes: + + CVE-2021-45444 + +* Tue Nov 02 2021 Arseny Maslennikov 1:5.8-alt3 +- New patches: + + compaudit: fix zsh executable discovery if /proc missing + + _rpm: complete -q --lastchange (Closes: 41261) + +* Sat Feb 27 2021 Arseny Maslennikov 1:5.8-alt2 +- Applied zsh-workers/47323 to fix Completion/Redhat/Command/_rpm. +- /etc/zlogout now only clears the screen on Linux VTs. + +* Sun Feb 07 2021 Arseny Maslennikov 1:5.8-alt1 +- 5.6.2 -> 5.8. +- Applied posted patches: + + zsh-workers/47867 + + zsh-workers/47868 + + zsh-workers/47918 +- Completion/ALT: updated _hasher. + +* Thu Nov 15 2018 Fr. Br. George 1:5.6.2-alt1 +- Autobuild version bump to 5.6.2 +- Provide /etc/zshrc.d + +* Tue Aug 14 2018 Fr. Br. George 1:5.5.1-alt1 +- Autobuild version bump to 5.5.1 (closes: #34248) + +* Mon Sep 04 2017 Fr. Br. George 1:5.4.2-alt1 +- Autobuild version bump to 5.4.2 +- ALT: improve _hasher completion (thanks to arseny@) + +* Wed Apr 05 2017 Gleb F-Malinovskiy 1:5.3.1-alt2 +- Switched builtin pwd -P to use getcwd(3). + +* Thu Feb 09 2017 Fr. Br. George 1:5.3.1-alt1 +- Autobuild version bump to 5.3.1 + +* Wed Jan 13 2016 Fr. Br. George 1:5.2-alt3 +- Fix _rpm completion + +* Wed Jan 13 2016 Fr. Br. George 1:5.2-alt2 +- Temporary restore upstream _rpm completion (ALT one is broken for now) + +* Wed Jan 13 2016 Fr. Br. George 1:5.2-alt1 +- Autobuild version bump to 5.2 + +* Fri Sep 25 2015 Fr. Br. George 1:5.1.1-alt1 +- Autobuild version bump to 5.1.1 + +* Mon Sep 07 2015 Fr. Br. George 1:5.1-alt1 +- Upgrade to 5.1 + +* Wed Oct 22 2014 Fr. Br. George 1:5.0.7-alt1 +- Autobuild version bump to 5.0.7 + +* Thu Sep 25 2014 Fr. Br. George 1:5.0.6-alt1 +- Autobuild version bump to 5.0.6 + +* Mon Jun 23 2014 Fr. Br. George 1:5.0.5-alt2 +- Provide additional fpath (for 3d-party completion etc.) + +* Thu Jan 16 2014 Fr. Br. George 1:5.0.5-alt1 +- Autobuild version bump to 5.0.5 +- Fix merge script + +* Sun Mar 31 2013 Fr. Br. George 1:5.0.2-alt1 +- Autobuild version bump to 5.0.2 + +* Thu Nov 15 2012 Fr. Br. George 1:5.0.0-alt1 +- Autobuild version bump to 5.0.0 +- Exclude upstream-privided systemd completion + +* Mon Apr 16 2012 Fr. Br. George 1:4.3.17-alt1 +- Autobuild version bump to 4.3.17 +- _vzctl completion bt mike@ +- remove noatime check in test (doesn't work in hasher anyway) + +* Tue Jan 10 2012 Fr. Br. George 1:4.3.15-alt6 +- New version (alt5uxx clone) + +* Wed Dec 21 2011 Alexey I. Froloff 1024:4.3.15-alt5uxx +- [4.3.15] + +* Thu Dec 01 2011 Alexey I. Froloff 1024:4.3.13-alt5uxx +- [4.3.13] + +* Tue Sep 27 2011 Alexey I. Froloff 1024:4.3.12-alt5uxx.135.g748bd73 +- [4.3.12-135-g748bd73] + +* Tue Sep 06 2011 Alexey I. Froloff 1024:4.3.12-alt5uxx.115.g7e528b4 +- [4.3.12-115-g7e528b4] + +* Thu Sep 01 2011 Alexey I. Froloff 1024:4.3.12-alt5uxx.1 +- [4.3.12-114-g2dbde98] + +* Tue May 31 2011 Alexey I. Froloff 1024:4.3.12-alt5uxx +- [4.3.12] +- Completion changes: + + _girar_remote: updated for "task add [task_id [subtask_id]]" syntax + +* Wed May 11 2011 Alexey I. Froloff 1024:4.3.11-alt3 +- [4.3.11-135-gd770d25] +- zshrc: dropped cp/mv/rm aliases +- Completion changes: + + _girar_info, _girar_remote: updated for new "task ls" syntax + +* Fri Dec 31 2010 Alexey I. Froloff 1:4.3.11-alt2 +- Completion changes: + + _ri: updated for Ruby 1.9.2 + +* Fri Dec 24 2010 Alexey I. Froloff 1:4.3.11-alt1 +- 4.3.10+cvs20100813 -> 4.3.11+cvs20101221 +- spec cleanup + +* Sat Aug 14 2010 Alexey I. Froloff 1:4.3.10-alt6 +- 4.3.10+cvs20100603 -> 4.3.10+cvs20100813 + +* Sat Jun 05 2010 Alexey I. Froloff 1:4.3.10-alt5 +- 4.3.10+cvs20100312 -> 4.3.10+cvs20100603 + +* Fri Mar 12 2010 Alexey I. Froloff 1:4.3.10-alt4 +- 4.3.10 release -> 4.3.10+cvs20100312 +- Enabled POSIX capability module (zsh/cap) +- Relocated tests to %%check section, enabled by default +- Completon: + + sudo: fixed -e option processing (closes: #22354) + +* Sat Nov 21 2009 Alexey I. Froloff 1:4.3.10-alt3 +- Completion changes: + + _girar: fixed typos, updated for new girar-utils + + _girar_remote: updated for recent girar changes + + _ri: rewritten for Ruby 1.9 support +- Startup files: + + zshrc: do not process /etc/bashrc (closes: #14641) + +* Sun Jul 19 2009 Alexey I. Froloff 1:4.3.10-alt2 +- New completion: gear-import, girar-remote, girar-clone and girar-import +- Do not package Completion/Linux/_rpmbuild, we have better completion + in _rpm function. + +* Sun Jun 21 2009 Alexey Tourbin 1:4.3.10-alt1 +- 4.3.9+cvs20081211 -> 4.3.10 release +- removed install_info scriptlets + +* Sun Jun 21 2009 Alexey I. Froloff 1:4.3.9-alt3 +- fixed building with new toolchain +- _apt: dropped "install package/release" syntax (closes: #19590) + +* Mon Apr 13 2009 Alexey I. Froloff 1:4.3.9-alt2 +- Completion fixes and improvements: + + rpm: fix --target option argument completion (closes: #9478) + + rsync: fix rsync remote file completion (closes: #12958) + + screen: fix session completion (closes: #16702) + + man: strip section and extension from all manual pages + + sudo: use it's built-in "secure path" for command completion + + gear-changelog: add -r/--rules option, --no-spec -> --no-specfile + + added (somewhat buggy) gear-buildreq, gear-hsh and gear-rpm + + aptitude: use _deb_packages on Debian, _rpm_packages otherwise + + aptitude: on "install" offer "avail" packages instead of "uninstalled" + + apt,aptitude: on "install" also offer package files (closes: #19590) + +* Mon Dec 15 2008 Alexey Tourbin 1:4.3.9-alt1 +- 4.3.6+cvs20080814 -> 4.3.9+cvs20081211 +- fixed building with new glibc/without stropts.h + +* Wed Aug 20 2008 Alexey Tourbin 1:4.3.6-alt2 +- 4.3.6 -> 4.3.6+cvs20080814 +- enabled new gdbm module +- new and updated ALT completion (Alexey I. Froloff): _add_changelog, + _control, _control_d, _gear, _sisyphus_check, _sisyphus_check_tests + +* Sun Apr 13 2008 Alexey Tourbin 1:4.3.6-alt1 +- 4.3.4/20070419 -> 4.3.6 +- _files: new style "list-dirs-first" (Sir Raorn) + +* Sat Jul 21 2007 Alexey Tourbin 1:4.3.4-alt3 +- fixed 'use-ip 1' completion for ssh hosts (Sir Raorn) +- changed src.rpm packaging to keep separate tarball with cvs snapshot + +* Thu Jun 14 2007 Alexey Tourbin 1:4.3.4-alt2 +- 4.3.4/20070419 -> 4.3.4/20070612 + +* Fri Apr 20 2007 Alexey Tourbin 1:4.3.4-alt1 +- 4.3.2/20070402 -> 4.3.4/20070419 + +* Thu Apr 05 2007 Alexey Tourbin 1:4.3.2-alt7 +- updated git completion (Nikolai Weibull, Sergey Vlasov) + +* Tue Apr 03 2007 Alexey Tourbin 1:4.3.2-alt6 +- updated to 4.3.2/20070402 +- fixed gdb completion (Sir Raorn) + +* Sun Jan 28 2007 Alexey Tourbin 1:4.3.2-alt5 +- following immediately after alt4, this release fixes a few recently + introduced problems with $'...' POSIX quotes + +* Sat Jan 27 2007 Alexey Tourbin 1:4.3.2-alt4 +- 4.3.2/20061219 -> 4.3.2/20070126 + +* Wed Dec 20 2006 Alexey Tourbin 1:4.3.2-alt3 +- zsh-4_3_2 at change 23071 (20061219) + +* Tue Nov 14 2006 Alexey Tourbin 1:4.3.2-alt2 +- zsh-4_3_2 at change 22998 (20061113) +- fixes for git completion (Sergey Vlasov) +- gear completion (Sir Raorn) + +* Sun Oct 22 2006 Alexey Tourbin 1:4.3.2-alt1 +- imported cvs sources with parsecvs, applied my changes to the source + tree and built with gear +- this release is based on the most recent cvs snapshot; among other + changes, multibyte IO is now the default; if you have any problems + in non-utf8 console, try "unsetopt multibyte" +- added completion for rpm-utils and hasher (Sir Raorn) + +* Sun Jul 30 2006 Alexey Tourbin 1:4.3.2-alt0.2 +- 4.3.2/20060414 -> 4.3.2/20060619 (20060730 snapshot has problems) +- added _pmount completion (Sir Raorn, #9501) +- updated _git completion from http://git.bitwi.se/dot-home.git (#9696) +- added setsid(1) compmletion (#9791) + +* Mon Apr 17 2006 Alexey Tourbin 1:4.3.2-alt0.1 +- 4.3.0/20051014 -> 4.3.2/20060414 + +* Sat Oct 15 2005 Alexey Tourbin 1:4.3.0-alt0.4 +- 4.3.0/20050926 -> 4.3.0/20051014 +- disabled POSIX capabilities (see #8142) +- added nodeps facility to _rpm completion in rpmb mode (#8193) + +* Mon Sep 26 2005 Alexey Tourbin 1:4.3.0-alt0.3 +- 4.3.0/20050718 -> 4.3.0/20050926 +- enabled unicode support (#7655) +- fixed typo in _rpm completion (#7398) +- added _ri completion (Sir Raorn, #7593) +- added reinstall facility to _apt completion (Sir Raorn, #7406) + +* Tue Jul 19 2005 Alexey Tourbin 1:4.3.0-alt0.2 +- 4.3.0/20050611 -> 4.3.0/20050718 (no unicode support yet) +- builtin "mkdir -p" failure on symlinks fixed upstream (#7368) +- added _known_hosts completion to _ssh (Sir Raorn, #5429) + +* Sat Jun 11 2005 Alexey Tourbin 1:4.3.0-alt0.1 +- 4.2.5/20050506 -> 4.3.0/20050611 (no unicode support yet) + +* Mon May 09 2005 Alexey Tourbin 1:4.2.5-alt2 +- 4.2.5 -> 4.2.5/cvs-20050506.patch (zsh-4_2-patches branch) +- rh-make-test-fail.patch: make "make test" failure not go ignored + +* Wed Apr 06 2005 Alexey Tourbin 1:4.2.5-alt1 +- 4.2.4/cvs-20050316.patch -> 4.2.5 + +* Wed Mar 16 2005 Alexey Tourbin 1:4.2.4-alt1 +- 4.2.1 -> 4.2.4/cvs-20050316.patch (zsh-4_2-patches branch) +- improved greatly apt and rpm completion (#5235) +- zlerc: enabled application keypad aliases for all terms (#1671) +- zshrc: enabled completion caching layer (affects apt, rpm, perldoc, etc.) +- alt-texinfo.patch: fixed @dircategory (Utilities -> Shells) +- packaged zshguide separately + +* Mon Aug 23 2004 Alexey Tourbin 1:4.2.1-alt1 +- 4.2.0 -> 4.2.1 +- build explicitly --with-tcsetpgrp +- ssh remote_files problem was fixed upstream +- enhanced tla completion accepted upstream (#3887) +- mdk-rebootin-completion.patch: completion for rebootin(8) +- mdk-default-path.patch: /usr/ucb -> /usr/X11R6/bin +- removed PATH assignment from zshenv + +* Wed Mar 24 2004 Alexey Tourbin 1:4.2.0-alt1 +- 4.2.0-pre-4 -> 4.2.0 +- %%_datadir/zsh/functions -> %%_datadir/zsh, + /usr/local/zsh/site-functions -> /usr/local/share/zsh +- ssh-remote_files.patch: enhance quoting because of _call_program/eval +- zshrc et al: a bit more tolerant of unmounted /usr + +* Sun Mar 14 2004 Alexey Tourbin 1:4.2.0-alt0.3 +- 4.2.0-pre-4 +- explicitly --enable-cap + +* Fri Mar 05 2004 Alexey Tourbin 1:4.2.0-alt0.2 +- 4.2.0-pre-2 +- explicitly --enable-pcre + +* Sat Feb 28 2004 Alexey Tourbin 1:4.2.0-alt0.1 +- 4.2.0-pre-1 +- updated patches; alt-tinfo.patch needed no more +- reworked apt4rpm completion stuff + +* Thu Feb 12 2004 Alexey Tourbin 1:4.1.1-alt4 +- fixed a bug introduced by apt4rpm.patch optimization (#3458) +- enabled maildir support in MAIL and MAILPATH +- updated dependencies on install/uninstall_info +- fixed _customdocdir misusage +- yodl is not required to build docs (pre-generated stuff is used) +- old changelogs (for 3.x) and other stuff from zsh-doc not packaged +- zsh-doc merged into zsh package + +* Thu Nov 06 2003 Alexey Tourbin 1:4.1.1-alt3 +- rh-serial.patch: make it work on serial ports (rh bug #56353) +- apt4rpm.patch: optimized for speed (2x gain) +- built explicitly without libnsl/NIS support +- pcre module built, with dependency tuning, so that zsh can reside in /bin +- /etc/zshrc: + + history size increased: 1000 -> 9999 + + more history options enabled + + use ~/.zsh_history instead of ~/.bash_history + + moved zle configuration options to /etc/zlerc + + synchronized /etc/zlerc with /etc/inputrc + + dropped ZLS_COLORS stuff as it caused problems + +* Sat Aug 23 2003 Alexey Tourbin 1:4.1.1-alt2 +- alt-zpty.patch: pty handling reworked, all tests pass; Sisyphus release +- alt-rpm-specific.patch: --lastchange option +- /etc/zshrc: + + additional key bindings (#0001609) + + /etc/bashrc is now sourced in interactive mode +- cvs-20030819-completion.patch: new completion functions available for + iptables, cdrecord, chmod, nice, nmap, rar, sabcmd, and ogg* +- zsh and zsh-doc packages use the same docdir + +* Sun Aug 03 2003 Alexey Tourbin 1:4.1.1-alt1 +- 4.1.1; revision of all patches: + + dropped: sigpipe.patch, cd.patch (needed no more) + + updated: apt4rpm.patch +- zshenv: TMPPREFIX=$HOME/tmp/zsh +- path versioning dropped (/usr/lib/zsh/%%version/zsh -> /usr/lib/zsh etc.) +- Daedalus release (some tests fail) + +* Fri Sep 27 2002 Rider 1:4.0.6-alt1 +- 4.0.6 + +* Mon Jul 01 2002 Dmitry V. Levin 4.0.4-alt5 +- Patched to link with libtinfo. +- Fixed %%pre/%%preun/%%postun scripts. +- Resurrected %%serial to enable upgrades (lost by rider). + +* Wed Jan 09 2002 Rider 4.0.4-alt4 +- _apt bugfix + +* Sun Jan 06 2002 Rider 4.0.4-alt3 +- apt-get completion fix (specific for ALT) +- /etc/zshrc cleanup + +* Thu Jan 03 2002 Rider 4.0.4-alt2 +- russian summary and description + +* Sat Nov 03 2001 Rider 4.0.4-alt1 +- 4.0.4 + +* Fri Aug 24 2001 Sergey Budnevitch 4.0.2-alt2 +- Updated user guide +- minor changes in config files + +* Sun Jul 15 2001 Sergey Budnevitch 4.0.2-alt1 +- 4.0.2 +- Remove duplicated documentation +- Sigpipe patch +- Several patches from development branch + +* Wed Feb 07 2001 Dmitry V. Levin 3.1.9-ipl5mdk +- Fixed invalid dependences on /usr/local/*. + +* Fri Jan 26 2001 Peter 'Nidd' Novodvorsky 3.1.9-ipl4mdk +- IPLabs Linux Team adaptations. + +* Sat Aug 26 2000 Chmouel Boudjnah 3.1.9-4mdk +- Set some %%config file to (noreplace). +- Make -A to complete spec file for _rpm. + +* Thu Jul 20 2000 Chmouel Boudjnah 3.1.9-3mdk +- Get /usr/share/man also in the completion for perl manpages. +- BM. + +* Wed Jul 5 2000 Chmouel Boudjnah 3.1.9-2mdk +- Fix buildroot hardcoded in binary. + +* Wed Jun 21 2000 Chmouel Boudjnah 3.1.9-1mdk +- Use makeinstall macros (not easy this one :\). +- 3.1.9. + +* Mon Jun 5 2000 Chmouel Boudjnah 3.1.8-1mdk +- 3.1.8. + +* Sun May 28 2000 Chmouel Boudjnah 3.1.6dev22-3mdk +- Fix path (%%prefix/ucb -> %%_bindir/X11) +- Fix keys (home-end-suppr-delete) directly in the zsh binary. + +* Sun Apr 16 2000 Chmouel Boudjnah 3.1.6dev22-2mdk +- Remove doble .so in %%_libdir/zsh/*. + +* Thu Apr 13 2000 Chmouel Boudjnah 3.1.6dev22-1mdk +- 3.1.6dev22. + +* Fri Mar 31 2000 Chmouel Boudjnah 3.1.6dev20-3mdk +- Fix completion of rpm with -qp*. + +* Mon Mar 27 2000 Chmouel Boudjnah 3.1.6dev20-2mdk +- Upgrade zshguide. + +* Sat Mar 25 2000 Chmouel Boudjnah 3.1.6dev20-1mdk +- 3.1.6-dev20 + +* Wed Mar 22 2000 Chmouel Boudjnah 3.1.6dev19-3mdk +- Move global configuration here. +- Adjust groups. + +* Tue Feb 22 2000 Chmouel Boudjnah 3.1.6dev19-2mdk +- Add new zshguide from pws. +- Separate the doc to the doc package + +* Sun Feb 20 2000 Chmouel Boudjnah 3.1.6dev19-1mdk +- Clean Up spec (thanks specs-helper). +- Remove all our patchs (now all is commited to upstream main). +- 3.1.6dev19. + +* Fri Feb 18 2000 Chmouel Boudjnah 3.1.6dev18-3mdk +- Recompile with glibc2.1.3 (first one). + +* Thu Feb 17 2000 Chmouel Boudjnah 3.1.6dev18-2mdk +- Add --freshen completion. + +* Tue Feb 15 2000 Chmouel Boudjnah 3.1.6dev18-1mdk +- Fix descriptions and summary. +- 3.1.6dev18. + +* Thu Feb 10 2000 Chmouel Boudjnah 3.1.6dev17-2mdk +- Remove Makefile in %%doc. +- BuildRequires: autoconf tetex. +- Lot of modications in the default config as suggested by Bart + Schaefer . +- 3.1.6dev17. + +* Mon Jan 24 2000 Chmouel Boudjnah 3.1.6dev16-1mdk +- dev16. +- Redo the tar_archive patchs. + +* Tue Jan 18 2000 Chmouel Boudjnah 3.1.6dev15-1mdk +- dev15. +- Fix doc generation with dev15. +- remove META-FAQ. +- disable lfs on sparc. + +* Thu Jan 6 2000 Chmouel Boudjnah 3.1.6dev14-1mdk +- dev14 (note the name change). + +* Mon Jan 3 2000 Chmouel Boudjnah 3.1.6pws13-3mdk +- Remove temporary files. + +* Fri Dec 31 1999 Chmouel Boudjnah +- 3.1.6pws13 (mainly bug fixes). +- fix %%post. +- fix rpm completion + +* Thu Dec 09 1999 Chmouel Boudjnah +- 3.1.6pws11 (mainly bug fixes). + +* Tue Dec 7 1999 Chmouel Boudjnah +- Add run-help and perl-build the documentation. + +* Tue Nov 30 1999 Francis Galiegue +- Completion machine patch - we use GNU make and GNU tar +- Small fix to %%post script + +* Tue Nov 30 1999 Chmouel Boudjnah +- 3.1.6pws10 +- Fix zprofile. +- Clean-up Franciseries. +- Clean-up specs. + +* Mon Nov 29 1999 Francis Galiegue +- Grrr... Rebuilt on kenobi, toy ain't a cooker + +* Mon Nov 29 1999 Francis Galiegue +- Completion system now handles bzip2'ed manpages and tarballs +- Some cool options + +* Wed Nov 10 1999 Chmouel Boudjnah +- Add zshguide.txt to documentation. + +* Thu Oct 07 1999 Chmouel Boudjnah +- Fix bug in %%_sysconfdir/zsh use USERNAME instead of USER. +- Improve %%_sysconfdir/z* to source the /etc/profile.d/ files. + +* Mon Oct 04 1999 Chmouel Boudjnah +- 3.1.6-pws6 +- Fix bad link. +- Fix bad manpages. + +* Tue Aug 17 1999 Thierry Vignaud +- fix typo in examples directory name + +* Sun Aug 8 1999 Chmouel Boudjnah +- Copy documentation (yes a lot). +- Remove the completion machine and put them in [[ {etc,root}(skel|files) ]] package. + +* Sat Aug 7 1999 Chmouel Boudjnah +- By defaut we launch the completion machine. +- Put zsh in %%_bindir/ +- Rewrite of Spec file for this new major version.