diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2016-12-04 04:32:03 +0100 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2016-12-04 04:32:03 +0100 |
commit | 3e439c3863f14c82f70666804c8570a13b3732e6 (patch) | |
tree | 07036c43e0f3f9242bb6dd42cd2a849ec8ea8aca /Completion/Unix/Command/_script | |
parent | 2aedc4b88fd0e87b89583983951b04b96f48efd3 (diff) | |
parent | 7b7e84f0815ed22a0ee348a217776529035dccf3 (diff) | |
download | zsh-3e439c3863f14c82f70666804c8570a13b3732e6.tar.gz zsh-3e439c3863f14c82f70666804c8570a13b3732e6.zip |
Merge tag 'zsh-5.2-test-1' into debian
Diffstat (limited to 'Completion/Unix/Command/_script')
-rw-r--r-- | Completion/Unix/Command/_script | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_script b/Completion/Unix/Command/_script new file mode 100644 index 000000000..7f682eaa2 --- /dev/null +++ b/Completion/Unix/Command/_script @@ -0,0 +1,71 @@ +#compdef script scriptreplay + +local args hlp="-h --help -V --version" + +if [[ $service = scriptreplay ]]; then + _arguments -S -s \ + "(1 -t --timing $hlp)"{-t+,--timing=}'[specify file containing timing output]:timing file:_files' \ + "(2 -s --typescript $hlp)"{-s+,--typescript=}'[specify file containing terminal output]:typescript file:_files' \ + "(3 -d --divisor $hlp)"{-d+,--divisor=}'[speed up replay]:factor' \ + "(-m --maxdelay $hlp)"{-m+,--maxdelay=}'[set maximum delay between updates]:delay (seconds)' \ + '(- *)'{-h,--help}'[display help information]' \ + '(- *)'{-V,--version}'[display version information]' \ + "(-t --timing $hlp):timing file:_files" \ + "(-s --typescript $hlp):typescript file:_files" \ + "(-d --divisor $hlp): :_guard '[0-9.]#' 'timing divisor'" + return +fi + +case $OSTYPE in + linux*) + args=( -S + "(-a --append $hlp)"{-a,--append}'[append output]' + "(-c --command $hlp)"{-c,--command=}'[run specified command instead of a shell]:command:_cmdstring' + "(-e --return $hlp)"{-e,--return}'[return exit status of the child process]' + "(-f --flush $hlp)"{-f,--flush}'[flush output after each write]' + "($hlp)--force[use output file even when it is a link]" + "(-q --quiet $hlp)"{-q,--quiet}'[be quiet]' + "(-t --timing $hlp)"{-t-,--timing=-}'[output timing data]::timing file:_files' + '(- 1)'{-h,--help}'[display help information]' + '(- 1)'{-V,--version}'[display version information]' + ) + ;; + darwin*|dragonfly*|netbsd*|freebsd*) + args=( + '-q[be quiet: suppress display of starting and ending lines]' + ) + ;| + netbsd*|freebsd*) + args+=( + '(-a -r -k)-d[suppress sleeps when playing back a session]' + '(-a -r -k -t)-p[play back a recorded session]' + '(-d -p)-r[record a session with input, output and timing data]' + ) + ;| + netbsd*) + args+=( + '-f[flush output after each write]' + '-c[run specified command instead of a shell]:command:_cmdstring' + ) + ;| + freebsd*) + args+=( + '-f[use filemon(4)]' + ) + ;| + darwin*|dragonfly*|freebsd*) + args+=( + '-t+[specify interval of data flushing]:interval (seconds)' + '-k[log keys sent to the program as well as output]' + '*:::arguments: _normal' + ) + ;| + *) + args+=( + '(-p -d)-a[append output]' + ) + ;; +esac + +_arguments -s $args \ + "($hlp):typescript file:_files" |