Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#299950: zsh: Better completion for "svn revert"
- X-seq: zsh-workers 21072
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx, 299950-forwarded@xxxxxxxxxxxxxxx
- Subject: Re: Bug#299950: zsh: Better completion for "svn revert"
- Date: Thu, 31 Mar 2005 03:02:41 +0200
- In-reply-to: <20050327003652.GA20238@xxxxxxxxxxx>
- Mail-followup-to: Vincent Lefevre <vincent@xxxxxxxxxx>, zsh-workers@xxxxxxxxxx, 299950-forwarded@xxxxxxxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20050317142638.GA23797@xxxxxxxxxxxxxxxx> <20050325142839.GA32333@xxxxxxxxxxx> <20050325161734.GT19392@xxxxxxxxxxxxx> <20050327003652.GA20238@xxxxxxxxxxx>
On 2005-03-26 19:36:52 -0500, Clint Adams wrote:
> +(( $+functions[_svn_adm_files] )) ||
> +_svn_adm_files() {
> + compadd ${${(M)${(f)"$(svn status)"}:#(#s)[ADM]*}##[ADM] ##}
Doing a recursive "svn status" is not a good idea, as it may take
a very long time. I suggest doing a "svn -N status" and completing
also on any directory containing a .svn subdirectory.
Moreover, the [ADM] pattern is incorrect. It should be ([ADM]|?M).
This would give:
compadd ${${(M)${(f)"$(svn -N status)"}:#(#s)([ADM]|?M)*}##([ADM]|?M) ##}
+ the code to complete on directories (only those that contain a
.svn subdirectory, in fact).
When one tries to complete on
svn revert path/to/dir/
zsh should do a "svn -N status path/to/dir", which returns lines like
A path/to/dir/added_file
D path/to/dir/deleted_file
M path/to/dir/modified_file
M path/to/dir/modifprop_file
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
Messages sorted by:
Reverse Date,
Date,
Thread,
Author