From ab7ec8d9851fea8230e1ccfba284c5bfaf457d88 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Sun, 3 May 2015 16:53:47 +0200 Subject: 35011: update completions for some common Unix commands, in particular improving FreeBSD support --- Completion/Unix/Command/_cp | 73 +++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 35 deletions(-) (limited to 'Completion/Unix/Command/_cp') diff --git a/Completion/Unix/Command/_cp b/Completion/Unix/Command/_cp index 70ab0858e..4c4dea2e9 100644 --- a/Completion/Unix/Command/_cp +++ b/Completion/Unix/Command/_cp @@ -1,22 +1,23 @@ -#compdef cp +#compdef cp gcp if _pick_variant gnu=GNU unix --version; then _arguments -s -S \ - '(-a --archive)'{-a,--archive}'[same as -dR --preserve=all]' \ + '(-a --archive)'{-a,--archive}'[archive mode, same as -dR --preserve=all]' \ + "--attributes-only[don't copy file data, just attributes]" \ '(-b --backup)-b[backup]' \ - '(-b --backup)--backup=[backup]:method:(none off numbered t existing nil simple never)' \ + '(-b --backup)--backup=-[backup each destination file]::method:(none off numbered t existing nil simple never)' \ '--copy-contents[copy contents of special files when recursive]' \ '-d[same as --no-dereference --preserve=links]' \ '(-f --force)'{-f,--force}'[remove and retry for destinations that cannot be opened]' \ - '(-i --interactive)'{-i,--interactive}'[prompt before overwrite]' \ + '(-i --interactive -n --no-clobber)'{-i,--interactive}'[prompt before overwrite]' \ '-H[follow command-line symbolic links]' \ '(-l --link)'{-l,--link}'[link files instead of copying]' \ '(-L --dereference)'{-L,--dereference}'[always follow symbolic links]' \ - '(-n --no-clobber)'{-n,--no-clobber}'[do not overwrite an existing file]' \ + (-n --no-clobber -i --interactive){-n,--no-clobber}"[don't overwrite an existing file]" \ '(-P --no-dereference)'{-P,--no-dereference}'[never follow symbolic links]' \ '-p[same as --preserve=mode,ownership,timestamps]' \ - '--preserve=[preserve specified attributes]:attributes to preserve:_values -s , mode timestamps ownership links context xattr all' \ - '--no-preserve=[don'\''t preserve specified attributes]:attributes not to preserve:_values -s , mode timestamps ownership links context xattr all' \ + '--preserve=-[preserve specified attributes]:: :_values -s , attribute mode timestamps ownership links context xattr all' \ + "--no-preserve=[don't preserve specified attributes]: :_values -s , attribute mode timestamps ownership links context xattr all" \ '--parents[append source path to target directory]' \ '(-R -r --recursive)'{-R,-r,--recursive}'[copy directories recursively]' \ '--reflink=-[control clone/CoW copies]::when to perform a lightweight copy:(always auto)' \ @@ -24,39 +25,41 @@ if _pick_variant gnu=GNU unix --version; then '--sparse=[control creation of sparse files]:when to create sparse files:(auto always never)' \ '--strip-trailing-slashes[remove any trailing slashes from each source argument]' \ '(-s --symbolic-link)'{-s,--symbolic-link}'[make symbolic links instead of copies of non-directories]' \ - '(-S --suffix)'{-S,--suffix=}'[override the usual backup suffix]:backup suffix:' \ - '(-t --target-directory)'{-t,--target-directory=}'[copy all source arguments into target directory]:target directory:_files -/' \ + '(-S --suffix)'{-S+,--suffix=}'[override the usual backup suffix]:backup suffix' \ + '(-t --target-directory)'{-t+,--target-directory=}'[copy all source arguments into target directory]:target directory:_files -/' \ '(-T --no-target-directory)'{-T,--no-target-directory}'[treat DEST as a normal file]' \ '(-u --update)'{-u,--update}'[copy only when source is newer than destination or destination is missing]' \ '(-v --verbose)'{-v,--verbose}'[explain what is being done]' \ '(-x --one-file-system)'{-x,--one-file-system}'[stay on this file system]' \ - '--help' \ - '--version' \ + '(--context)-Z[set