Sha256: 62c08ba57a9fb85de7b7b7bfb3105fd243b113070be3d9d04fbd525866def74d

Contents?: true

Size: 742 Bytes

Versions: 19

Compression:

Stored size: 742 Bytes

Contents

#compdef t

_t() {
  local curcontext="$curcontext" state line
  typeset -A opt_args

  _arguments \
      '1: :->t_command'\
      '2: :->first_arg'

  case $state in
  t_command)
    compadd "$@" archive backend configure display edit in kill\
                 list now out resume sheet week month
  ;;

  first_arg)
    # If the first argument starts with s or d (sheet or display),
    # the second argument can be autocompleted to one of the existing
    # non-archived sheets.
    if [[ $words[2] == s* || $words[2] == d* ]]; then
      query='SELECT DISTINCT(sheet) FROM entries WHERE sheet NOT LIKE "\_%" ESCAPE "\";'
      echo $query | t b | while read sheet; do
        compadd "$@" $sheet
      done
    fi
  ;;
  esac
}

_t "$@"

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
timetrap-1.15.4 completions/zsh/_t
timetrap-1.15.2 completions/zsh/_t
timetrap-1.15.1 completions/zsh/_t
timetrap-1.14.3 completions/zsh/_t
timetrap-1.15.0 completions/zsh/_t
timetrap-1.14.2 completions/zsh/_t
timetrap-1.14.1 completions/zsh/_t
timetrap-1.14.0 completions/zsh/_t
timetrap-1.13.0 completions/zsh/_t
timetrap-1.12.0 completions/zsh/_t
timetrap-1.11.0 completions/zsh/_t
timetrap-1.10.0 completions/zsh/_t
timetrap-1.9.0 completions/zsh/_t
timetrap-1.8.14 completions/zsh/_t
timetrap-1.8.13 completions/zsh/_t
timetrap-1.8.12 completions/zsh/_t
timetrap-1.8.11 completions/zsh/_t
timetrap-1.8.10 completions/zsh/_t
timetrap-1.8.9 completions/zsh/_t