zsh-workers
 help / color / mirror / code / Atom feed
4f6453e23f4edeab7705a60c60239dbe881c1491 blob 1715 bytes (raw)

 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
47
48
49
 
#compdef chsh chpass
case $OSTYPE in
(darwin*)
  _arguments : \
      '-s[specify user login shell]:shell:(${(Z+Cn+)"$(</etc/shells)"})' \
      "-l[specify location of user]:node:" \
      "-u[specify authentication name]:auth user:" \
      "1:user name:_users"
  ;;
(*bsd*|dragonfly*)
  # options common to most BSD flavors
  _arguments : \
      '(-a)-s[specify user login shell]:shell:(${(Z+Cn+)"$(</etc/shells)"})' \
      '(-s)-a[passwd file entry]:colon-separated list:' \
      '(-y)-l[change local password database]' \
      '(-l)-y[change YP(NIS) password database]' \
      '1:user name:_users'
  ;;
(linux-gnu)
  if { =chsh -v } >&/dev/null
  then
      local -a opts shells
      shells=( $(=chsh -l) )
      _arguments : \
	  "(-)-s[specify your login shell]:shell:($shells)" \
	  "(-)--shell[specify your login shell]:shell:($shells)" \
	  "(-)-l[print shells in /etc/shells]" \
	  "(-)--list-shells[print shells in /etc/shells]" \
	  "(-)-u[print a usage message and exit]" \
	  "(-)--help[print a usage message and exit]" \
	  "(-)-v[print version information and exit]" \
	  "(-)--version[print version information and exit]" \
	  "1:user name:_users"
      return
  fi
  # else fall through
  ;&
(*)
  local s=''
  # Use $s to cause all options to be treated as mutually exclusive
  [[ $words[CURRENT-1] = -* ]] && s="(-)$words[CURRENT-1]"
  # This fiddling with $s is a hack to cause "_arguments  : --" to use
  # the /etc/shells listing for -s or --shell even when the description
  # of that option has been pulled from the GNU --help output.
  [[ $words[CURRENT-1] = (-s|--shell) ]] &&
    s="$s"'[ ]:shell:(${(Z+Cn+)"$(</etc/shells)"})'
  _arguments : $s "1:user name:_users" --
  ;;
esac
debug log:

solving 4f6453e ...
found 4f6453e in https://inbox.vuxu.org/zsh-workers/99E218E6-33F1-4FC2-91A9-818305EFB5C7@kba.biglobe.ne.jp/
found 97552e3 in https://git.vuxu.org/mirror/zsh/
preparing index
index prepared:
100644 97552e3acf88b3855f35dbccb2dadf4ed69e7c4b	Completion/Unix/Command/_chsh

applying [1/1] https://inbox.vuxu.org/zsh-workers/99E218E6-33F1-4FC2-91A9-818305EFB5C7@kba.biglobe.ne.jp/
diff --git a/Completion/Unix/Command/_chsh b/Completion/Unix/Command/_chsh
index 97552e3..4f6453e 100644

Checking patch Completion/Unix/Command/_chsh...
Applied patch Completion/Unix/Command/_chsh cleanly.

index at:
100644 4f6453e23f4edeab7705a60c60239dbe881c1491	Completion/Unix/Command/_chsh

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).