much improved zsh completion script

Steve Borho steve at ageia.com
Thu Oct 20 05:52:26 BST 2005


On Wednesday 19 October 2005 10:11 pm, John A Meinel wrote:
> Steve Borho wrote:
> > 2) Optimally, bzr would make it easy to get lists of files in the context
> > of the current directory.  For instance, if you were working four subdirs
> > deep from the branch root, you would like to be able to type 'bzr add
> > <TAB>' and have zsh complete a list of unknown files in the current
> > directory.
> >
> > I couldn't figure out how to make this work with the current commands, so
> > the bzr add and bzr commit completion functions only work properly from
> > the repository root.
>
> bzr status .
> Will only return the changes for files beneath the current working
> directory. However, they are returned with their full path, so you might
> need to do "bzr root" first.

For my purposes, it would be infinitely more useful for the various listing 
commands to support the '.' argument.  Having 'bzr unknowns .' return just
the list of unknowns in the current directory would be perfect.  Mainly 
because there's no simple way for me to prune the list of files that bzr 
status returns.

The 'bzr ls' command doesn't seem to be documented anywhere that I can find.  
Is that command intended to eventually handle some of these types of queries?
something like this?  bzr ls --added --modified --deleted .

I think this would be useful for more than just shell completions.  It would 
be very handy for scripting in general.

BTW: I've just stumbled upon the shell-complete function's ability to spit out 
a list of arguments for each command.  This has promise, but I think it would 
need a bit of work before zsh's compsys could use the output directly.

--
Steve




More information about the bazaar mailing list