Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug in _gnu_generic for "cp -a"?
- X-seq: zsh-users 15067
- From: Andy Spiegl <zsh.Andy@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Bug in _gnu_generic for "cp -a"?
- Date: Wed, 19 May 2010 19:37:56 +0200
- In-reply-to: <AANLkTilf4VJehRx3kf_XNUc4B8YO1EexzsZIaaclnFJ2@xxxxxxxxxxxxxx>
- Kreccount: 1
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20100519125713.GA17396@xxxxxxxxx> <AANLkTilf4VJehRx3kf_XNUc4B8YO1EexzsZIaaclnFJ2@xxxxxxxxxxxxxx>
On 2010-05-19, 08:30, Bart Schaefer wrote:
>
> Is there a reason you wanted to override the _cp completer that is
> provided by default? Does it get something else wrong that
> _gnu_generic solved?
To be honest, I can't remember. I added this line to my config
years ago and unfortunately didn't add a comment. But I assume
that the _cp completer had some kind of problem back then.
> What do you see with
>
> % cp -<TAB>
>
condor:~/tmp> compdef _gnu_generic cp
condor:~/tmp> cp -<TAB>
- option -
--archive -a -- same as -dR --preserve=all
-b -- like --backup but does not accept an argument
--backup -- make a backup of each existing destination file
--copy-contents -- copy contents of special files when recursive
-d -- same as --no-dereference --preserve=links
--dereference -L -- always follow symbolic links in SOURCE
--force -f -- if an existing destination file cannot be
-H -- follow command-line symbolic links in SOURCE
--help -- display this help and exit
--interactive -- prompt before overwrite (overrides a previous -n
--link -l -- link files instead of copying
--no-clobber -n -- do not overwrite an existing file (overrides
--no-dereference -P -- never follow symbolic links in SOURCE
--no-preserve -- don't preserve the specified attributes
--no-target-directory -T -- treat DEST as a normal file
--one-file-system -x -- stay on this file system
-p -- same as --preserve=mode,ownership,timestamps
--parents -- use full source file name under DIRECTORY
--preserve -- preserve the specified attributes (default-
--recursive -r -R -- copy directories recursively
--remove-destination -- remove each existing destination file before
--sparse -- control creation of sparse files
--strip-trailing-slashes -- remove any trailing slashes from each SOURCE
--suffix -S -- override the usual backup suffix
--symbolic-link -s -- make symbolic links instead of copying
--target-directory -t -- copy all SOURCE arguments into DIRECTORY
--update -u -- copy only when the SOURCE file is newer
--verbose -v -- explain what is being done
--version -- output version information and exit
With the default _cp completer:
condor:~/tmp> cp -<TAB>
- option -
--archive -a -- same as -dpR
-b -- backup
--backup -- method
--copy-contents -- copy contents of special files when recursive
-d -- same as --no-dereference --preserve=link
--dereference -L -- always follow symbolic links
--force -f -- remove and retry for destinations that cannot be opened
-H -- follow command-line symbolic links
--link -l -- link files instead of copying
--no-preserve -- attributes not to preserve
--one-file-system -x -- stay on this file system
-p -- same as --preserve=mode,ownership,timestamps
-P -- same as --no-dereference
--parents -- append source path to target directory
--preserve -- attributes to preserve
--recursive -r -R -- copy directories recursively
--remove-destination -- remove each existing destination file before attempting to open it
--reply -- how to handle the prompt about an existing destination file
--sparse -- when to create sparse files
--strip-trailing-slashes -- remove any trailing slashes from each source argument
--suffix -S -- backup suffix
--symbolic-link -s -- make symbolic links instead of copies of non-directories
--target-directory -- target directory
--update -u -- copy only when source is newer than destination or destination is
--verbose -v -- explain what is being done
--help --version
condor:~> echo $ZSH_VERSION
4.3.10
condor:~> uname -a
Linux condor 2.6.31-21-generic #59-Ubuntu SMP Wed Mar 24 07:28:27 UTC 2010 x86_64 GNU/Linux
condor:~> cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.10
DISTRIB_CODENAME=karmic
DISTRIB_DESCRIPTION="Ubuntu 9.10"
Cheerio,
Andy.
--
lÆÇÄds ÊpuÉ
Messages sorted by:
Reverse Date,
Date,
Thread,
Author