On Sun, Apr 22, 2007 at 03:30:09PM +0200, Christian Boltz wrote:
Hello,
I just thought that bash completion for osc would be a nice idea ;-)
I can't contribute much on the bash side, but for zsh, the shell I use. I'm attaching here what I've got. It does seem to work for me for a number of commands. It completes for help, add, delete, commit, log, and (to some degree) for build. I'm posting it here, since it is neither finished nor well tested, but zsh users can try it out. I copied from subversion, which tries to cache stuff per directory, but that doesn't seem to work because the directory name (which was used as key in the associative array) was always set to "." -- I fixed that, but I decided to cache only "osc repos" output. Caching of "modified" status of files per directory doesn't seem like a good idea to me, because there is no way to invalidate the cache entry, and that status can change all the time. But I think it is worth caching the build targets, for example, for the log and build command, because the don't change frequently. Peter -- Allen Gewalten zum Trutz sich erhalten. SUSE LINUX Products GmbH Research & Development