[go: up one dir, main page]

File: _dochelp

package info (click to toggle)
dochelp 0.1.2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 140 kB
  • ctags: 77
  • sloc: ml: 613; makefile: 46; ansic: 19; sh: 9
file content (36 lines) | stat: -rw-r--r-- 1,015 bytes parent folder | download
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
29
30
31
32
33
34
35
36
#compdef dochelp

local curcontext="$curcontext" state line ret=1

_list_doc_base_documents () {
  dochelp --list
}

_arguments -C \
  '(- 1 *)'{-help,--help}'[display help information]' \
  '(- 1 *)--version[display version information]' \
  '(--list)'{--list}'[List available documents]' \
  '(--search)'{--search}"[Look for a matching document]:regexp" \
  '(--info)'{--info}'[Print available information for a document]:document id' \
  '(--open)'{--open}'[Open given document]:document id' \
  '(--update)'{--update}'[Update global indexes]' \
  '(--target)'{--target}'[Specify path of the generated html page]:' \
  '(--online)'{--online}'[Use relative paths in generated HTML page]' \
  '--base-doc[Specify doc-base dir]' \
  '--version[Print version number]' \
  '*: :->args' && ret=0

case $state in
  args)
    case $line[1] in
      -i|--info|-o|--open)
        _list_doc_base_documents && ret=0
      ;;
      *)
        (( ret )) && _message 'no more arguments'
      ;;
    esac
  ;;
esac

return ret