You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Gerlando Falauto <ge...@keymile.com> on 2012/07/30 11:51:36 UTC

[PATCH] bash URL completion

Hi everyone,

I strongly felt the urge to have some way of bash-completing URLS from 
the command line when doing checkouts, listing, cat (for README/REVNOTES 
files) and so on...
I looked up the "tools/client-side/bash_completion" script only to 
realize it works for local (file:///) but not remote URLs.
So I came up with the attached patch, which works for me (tested with 
bash 4.1.2, svn 1.6.11)
The idea was (apart from adding sub-dir completion with a gross "svn ls" 
command) to (manually) list known repositories within a ~/.svn_repos 
file, one per line:

http://srv1/proj1
svn://srv2/proj2

The reason behind this is that data cached in 
~/.subversion/auth/svn.simple does not contain the full project URL 
(only the server name) and I could not find a way to get that 
information anywhere else.

I known it would've made more sense to ask for advice *BEFORE* touching 
the code, but still... :-)

Thanks in advance for your feedback!
Gerlando

P.S. I'm not subscribed to the list, so please Cc: me, thanks!

[[[
Implement bash URL completion from remote repos

* tools/client_side/bash_completion
   add remote svn ls for file/subdirectory completion
   complete repository names listed within ~/.svn_repos
]]]