zsh-workers
 help / color / mirror / code / Atom feed
027b2e68cdf9579d51ef3dd02dfdb6c0da2beff0 blob 2153 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
50
51
52
53
54
55
 
#compdef mv gmv zf_mv

local args variant aopts=( -A '-*' )

_pick_variant -r variant -b zsh gnu=GNU $OSTYPE --version
case $variant; in
  gnu)
    aopts=()
    args=(
      '(-b --backup -n --no-clobber)--backup=[make a backup of each existing destination file]: : _values "backup type"
        {none,off}"[never make backups]"
        {numbered,t}"[make numbered backups]"
        {existing,nil}"[numbered backups, if they already exist]"
        {simple,never}"[always make simple backups]"'
      '(-b --backup -n --no-clobber)-b[make a backup of each existing destination file]'
      '(-f --force -i --interactive -n --no-clobber)'{-f,--force}"[don't prompt before overwriting]"
      '(-f --force -i --interactive -n --no-clobber)'{-i,--interactive}'[prompt before overwriting existing file]'
      '--strip-trailing-slashes[remove any trailing slashes from each source argument]'
      '(-S --suffix)'{-S+,--suffix=}'[specify the backup suffix]:backup suffix [~]'
      '(-t --target-directory)'{-t+,--target-directory=}'[move all source arguments into specified directory]:directory:_directories'
      '(-T --no-target-directory)'{-T,--no-target-directory}'[treat final argument as a normal file]'
      '(-u --update)'{-u,--update}'[move only when destination file is older or missing]'
      '(-v --verbose)'{-v,--verbose}'[show file names after they are moved]'
      '(- *)--help[display usage information]'
      '(- *)--version[display version information]'
    )
    [[ $OSTYPE = linux* ]] && args+=(
      '(-Z --context)'{-Z,--context}'[set SELinux security context of destination file to default type]'
    )
    ;;
  *)
    args=(
      "(-i -n)-f[don't prompt before overwriting]"
      '(-f -n)-i[prompt before overwriting existing file]'
    )
    ;|
  darwin*|dragonfly*|freebsd*)
    args+=(
      "(-f -i)-n[don't overwrite existing file]"
    )
    ;|
  darwin*|dragonfly*|*bsd*)
    args+=(
      '-v[show file names after they are moved]'
    )
    ;|
  dragonfly*|freebsd*)
    args+=(
      "-h[if target is a symlink to a directory, don't follow it]"
    )
    ;;
esac

_arguments -s -S $aopts $args \
  '*:file:_files'
debug log:

solving 027b2e68c ...
found 027b2e68c in https://git.vuxu.org/mirror/zsh/

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).