about summary refs log tree commit diff
path: root/Completion/Unix/Command/_seq
blob: 5b825675faef2c8e10b6fff346610707548639e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#compdef seq gseq

local variant args

_pick_variant -r variant gnu=GNU $OSTYPE --version

args=( ':: :_guard "^-[^0-9]*" '{first,step,last} )
case $variant in
  gnu)
    args+=(
      '(--help --version)'{-f+,--format=}'[use printf style floating-point format]:format'
      '(--help --version -s --separator)'{-s+,--separator=}'[use specified separator for numbers]:separator [\n]'
      '(--help --version -w --equal-width)'{-w,--equal-width}'[equalize width by padding with leading zeroes]'
      '(- 1 2 3)--help[display usage information]'
      '(- 1 2 3)--version[display version information]'
     )
  ;;
  *)
    args+=(
      '-f+[use printf style floating-point format]:format'
      '-s+[use specified separator for numbers]:separator [\n]'
      '-t+[use specified string to terminate numbers]:string [\n]'
      '-w[equalize width by padding with leading zeroes]'
    )
  ;;
esac

_arguments -s -A '-[^1-9]*' $args