File: zsh_completion

package info (click to toggle)
etckeeper 1.18.23-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,640 kB
  • sloc: sh: 1,267; python: 111; makefile: 109; ansic: 81
file content (27 lines) | stat: -rw-r--r-- 634 bytes parent folder | download | duplicates (4)
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
#compdef etckeeper

local _VCS=$(sed -n "s,^VCS=\([\"']\?\)\(.*\)\1$,\2,p" \
    ${ETCKEEPER_CONF_DIR:-/etc/etckeeper}/etckeeper.conf 2>/dev/null)

_arguments '--help[show this help message and exit]' \
    '--version[show version information]' \
    ":etckeeper command:(/etc/etckeeper/*.d(/:t:r))" \
    '*::subcmd:->subcmd' && return 0

case "$words[1]" in
(commit)
    _arguments ':message text: '
    ;;
(update-ignore)
    _arguments '-a[add a "managed by etckeeper" block]'
    ;;
(uninit)
    _arguments '-f[force uninit without prompting]'
    ;;
(vcs)
    [[ $_VCS == git ]] && service=git
    _$_VCS
    ;;
(*)
    ;;
esac