about summary refs log tree commit diff
path: root/Completion/BSD/Command/_bsdinstall
blob: e0589d720fc7439d3217ed7d282939ec6fbb463b (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#compdef bsdinstall

local -a _bsdinstall_targets
_bsdinstall_targets=(
  'auto:standard interactive installation, including disk partitioning'
  "entropy:stores a small amount of data from /dev/random in the new system's root"
  'jail:sets up a new chroot system at destination, suitable for use with jail(8)'
  'script:run an installation script'
  "keymap:set the keymap and save to the new system's rc.conf"
  'hostname:set the hostname for the new system'
  'netconfig:configure networking'
  'autopart:run the interactive guided disk partitioner'
  'zfsboot:run the interactive/scriptable ZFS partitioner'
  'scriptedpart:non-interactive partition setup'
  'mount:mount the file systems previously configured by autopart, partedit, or scriptedpart'
  'distfetch:fetches the distributions in DISTRIBUTIONS to BSDINSTALL_DISTDIR from BSDINSTALL_DISTSITE'
  'checksum:verifies the checksums of the distributions listed in DISTRIBUTIONS'
  'distextract:extracts the distributions listed in DISTRIBUTIONS into BSDINSTALL_CHROOT'
  "rootpass:interactively invokes passwd(1) in the new system to set the root user's password"
  'adduser:interactively invokes adduser(8) in the new system'
  'time:interactively sets the time, date, and time zone of the new system'
  'services:queries the user for the system daemons to begin at system startup'
  'config:installs the configuration files destined for the new system'
)

local context state state_descr line
typeset -A val_args
_arguments -A '-*' : \
  '-D[installation log file]: : _files' \
  '1: :->targets' \
  '*: :->args'

case $state in
  targets) _describe targets _bsdinstall_targets;;
  args)
    shift words
    [[ $words[1] == '-D' ]] && shift 2 words

    case $words[1] in
      jail)         _files -/;;
      script)       _files;;
      scriptedpart) _message "$words[1] parameters";;
      *)            _message "nothing to complete"; return 1;;
    esac
    ;;
esac