From 57ca91ba9d6a2b4c4b69286c27cd0b8476c6f625 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Wed, 17 Aug 2011 10:18:14 +0000 Subject: 29682: new _schedtool completer --- Completion/Zsh/Command/.distfiles | 1 + Completion/Zsh/Command/_schedtool | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Completion/Zsh/Command/_schedtool (limited to 'Completion/Zsh/Command') diff --git a/Completion/Zsh/Command/.distfiles b/Completion/Zsh/Command/.distfiles index 6feec496d..3981f74cc 100644 --- a/Completion/Zsh/Command/.distfiles +++ b/Completion/Zsh/Command/.distfiles @@ -23,6 +23,7 @@ _print _prompt _read _sched +_schedtool _set _setopt _source diff --git a/Completion/Zsh/Command/_schedtool b/Completion/Zsh/Command/_schedtool new file mode 100644 index 000000000..869f146e3 --- /dev/null +++ b/Completion/Zsh/Command/_schedtool @@ -0,0 +1,25 @@ +#compdef schedtool + +local curcontext="$curcontext" line state ret=1 + +_arguments -C \ + '(-p -F -R -B -I -D -M)-N[for SCHED_NORMAL]' \ + '( -N -R -B -I -D -M)-F[for SCHED_FIFO]' \ + '( -N -F -B -I -D -M)-R[for SCHED_RR]' \ + '(-p -N -F -R -I -D -M)-B[for SCHED_BATCH]' \ + '( -N -F -R -B -D -M)-I[for SCHED_ISO]' \ + '(-p -N -F -R -B -I -M)-D[for SCHED_IDLEPRIO]' \ + '( -N -F -R -B -I -D )-M[for manual mode; raw number for POLICY]:raw policy number' \ + '( -N -B -D )-p[usually 1-99; only for FIFO, RR or ISO]:static priority' \ + '-a[cpu affinity]:mask or list' \ + '-n[set niceness to NICE_LEVEL]:priority' \ + '-e[start COMMAND with specified policy/priority]:program: _command_names -e:*::program arguments: _normal' \ + '-v[be verbose]' \ + '*:processes:->processes' && ret=0 + +if [[ -n "$state" ]]; then + _alternative \ + 'processes:: _pids' && ret=0 +fi + +return ret -- cgit v1.2.3 From f0eaa5713eca5abfdeacabb1a71159456d1e3539 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Thu, 18 Aug 2011 12:48:42 +0000 Subject: unposted: move _schedtool to correct dir --- ChangeLog | 10 +++++++++- Completion/Linux/Command/.distfiles | 1 + Completion/Linux/Command/_schedtool | 25 +++++++++++++++++++++++++ Completion/Zsh/Command/.distfiles | 1 - Completion/Zsh/Command/_schedtool | 25 ------------------------- 5 files changed, 35 insertions(+), 27 deletions(-) create mode 100644 Completion/Linux/Command/_schedtool delete mode 100644 Completion/Zsh/Command/_schedtool (limited to 'Completion/Zsh/Command') diff --git a/ChangeLog b/ChangeLog index 2c409cfdd..059d6db6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-08-18 Mikael Magnusson + + * unposted: Completion/Linux/Command/.distfiles, + Completion/Linux/Command/_schedtool, + Completion/Zsh/Command/.distfiles, + Completion/Zsh/Command/_schedtool: move _schedtool completion + to correct directory. + 2011-08-17 Peter Stephenson * 29703: Src/exec.c, Src/subst.c, Test/D03procsubst.ztst: @@ -15307,5 +15315,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5440 $ +* $Revision: 1.5441 $ ***************************************************** diff --git a/Completion/Linux/Command/.distfiles b/Completion/Linux/Command/.distfiles index 509330f6b..941e2de3c 100644 --- a/Completion/Linux/Command/.distfiles +++ b/Completion/Linux/Command/.distfiles @@ -20,6 +20,7 @@ _modutils _mondo _pkgtool _rpmbuild +_schedtool _sshfs _strace _tpb diff --git a/Completion/Linux/Command/_schedtool b/Completion/Linux/Command/_schedtool new file mode 100644 index 000000000..869f146e3 --- /dev/null +++ b/Completion/Linux/Command/_schedtool @@ -0,0 +1,25 @@ +#compdef schedtool + +local curcontext="$curcontext" line state ret=1 + +_arguments -C \ + '(-p -F -R -B -I -D -M)-N[for SCHED_NORMAL]' \ + '( -N -R -B -I -D -M)-F[for SCHED_FIFO]' \ + '( -N -F -B -I -D -M)-R[for SCHED_RR]' \ + '(-p -N -F -R -I -D -M)-B[for SCHED_BATCH]' \ + '( -N -F -R -B -D -M)-I[for SCHED_ISO]' \ + '(-p -N -F -R -B -I -M)-D[for SCHED_IDLEPRIO]' \ + '( -N -F -R -B -I -D )-M[for manual mode; raw number for POLICY]:raw policy number' \ + '( -N -B -D )-p[usually 1-99; only for FIFO, RR or ISO]:static priority' \ + '-a[cpu affinity]:mask or list' \ + '-n[set niceness to NICE_LEVEL]:priority' \ + '-e[start COMMAND with specified policy/priority]:program: _command_names -e:*::program arguments: _normal' \ + '-v[be verbose]' \ + '*:processes:->processes' && ret=0 + +if [[ -n "$state" ]]; then + _alternative \ + 'processes:: _pids' && ret=0 +fi + +return ret diff --git a/Completion/Zsh/Command/.distfiles b/Completion/Zsh/Command/.distfiles index 3981f74cc..6feec496d 100644 --- a/Completion/Zsh/Command/.distfiles +++ b/Completion/Zsh/Command/.distfiles @@ -23,7 +23,6 @@ _print _prompt _read _sched -_schedtool _set _setopt _source diff --git a/Completion/Zsh/Command/_schedtool b/Completion/Zsh/Command/_schedtool deleted file mode 100644 index 869f146e3..000000000 --- a/Completion/Zsh/Command/_schedtool +++ /dev/null @@ -1,25 +0,0 @@ -#compdef schedtool - -local curcontext="$curcontext" line state ret=1 - -_arguments -C \ - '(-p -F -R -B -I -D -M)-N[for SCHED_NORMAL]' \ - '( -N -R -B -I -D -M)-F[for SCHED_FIFO]' \ - '( -N -F -B -I -D -M)-R[for SCHED_RR]' \ - '(-p -N -F -R -I -D -M)-B[for SCHED_BATCH]' \ - '( -N -F -R -B -D -M)-I[for SCHED_ISO]' \ - '(-p -N -F -R -B -I -M)-D[for SCHED_IDLEPRIO]' \ - '( -N -F -R -B -I -D )-M[for manual mode; raw number for POLICY]:raw policy number' \ - '( -N -B -D )-p[usually 1-99; only for FIFO, RR or ISO]:static priority' \ - '-a[cpu affinity]:mask or list' \ - '-n[set niceness to NICE_LEVEL]:priority' \ - '-e[start COMMAND with specified policy/priority]:program: _command_names -e:*::program arguments: _normal' \ - '-v[be verbose]' \ - '*:processes:->processes' && ret=0 - -if [[ -n "$state" ]]; then - _alternative \ - 'processes:: _pids' && ret=0 -fi - -return ret -- cgit v1.2.3 From 40a31c0180446437a2684a142a07880bf9caf1bb Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Tue, 6 Sep 2011 16:22:08 +0000 Subject: 29741: _zattr: add ret=0 and fix filename globbing. --- ChangeLog | 5 ++++- Completion/Zsh/Command/_zattr | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'Completion/Zsh/Command') diff --git a/ChangeLog b/ChangeLog index c143a57bb..06abc71a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,9 @@ * 29740: Completion/Unix/Command/_wget: add --content-disposition. + * 29741: Completion/Zsh/Command/_zattr: add ret=0, fix filename + globbing like in 27658 for _zip. + 2011-09-05 Barton E. Schaefer * users/16302: Completion/Unix/Type/_path_files: pattern matching @@ -15377,5 +15380,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5457 $ +* $Revision: 1.5458 $ ***************************************************** diff --git a/Completion/Zsh/Command/_zattr b/Completion/Zsh/Command/_zattr index cdc52281d..1924bb28d 100644 --- a/Completion/Zsh/Command/_zattr +++ b/Completion/Zsh/Command/_zattr @@ -26,9 +26,9 @@ _arguments \ '1:file:_files' \ '2:parameter' ;; -esac +esac && ret=0 if [[ $state = attrs ]]; then - zlistattr $~line[1] REPLY 2> /dev/null + zlistattr ${~${(Q)line[1]}} REPLY 2> /dev/null _wanted attrs expl 'attribute' compadd $REPLY fi -- cgit v1.2.3