mirror of
				git://git.code.sf.net/p/zsh/code
				synced 2025-10-31 06:00:54 +01:00 
			
		
		
		
	Greg: 27416: repository path enhancement
This commit is contained in:
		
							parent
							
								
									9e260715c4
								
							
						
					
					
						commit
						be1e9c189d
					
				
					 2 changed files with 18 additions and 4 deletions
				
			
		|  | @ -1,3 +1,8 @@ | |||
| 2009-11-19  Peter Stephenson  <pws@csr.com> | ||||
| 
 | ||||
| 	* Greg: 27416: Completion/Unix/Command/_subversion: repository | ||||
| 	path enhancement. | ||||
| 
 | ||||
| 2009-11-17  Peter Stephenson  <pws@csr.com> | ||||
| 
 | ||||
| 	* unposted: Completion/Unix/Command/_perforce: improve | ||||
|  | @ -12354,5 +12359,5 @@ | |||
| 
 | ||||
| ***************************************************** | ||||
| * This is used by the shell to define $ZSH_PATCHLEVEL | ||||
| * $Revision: 1.4815 $ | ||||
| * $Revision: 1.4816 $ | ||||
| ***************************************************** | ||||
|  |  | |||
|  | @ -2,6 +2,7 @@ | |||
| 
 | ||||
| _svn () { | ||||
|   local curcontext="$curcontext" state line expl ret=1 | ||||
|   typeset -A opt_args | ||||
| 
 | ||||
|   _arguments -C \ | ||||
|     '(-)--help[print help information]' \ | ||||
|  | @ -207,12 +208,20 @@ _svn_status() { | |||
| 
 | ||||
| (( $+functions[_svn_remote_paths] )) || | ||||
| _svn_remote_paths() { | ||||
|   local expl remfiles remdispf remdispd suf ret=1 | ||||
|   local expl remfiles remdispf remdispd suf ret=1 pfx='\^/' sub='^/' | ||||
| 
 | ||||
|   [[ -prefix *://*/ ]] || return 1 | ||||
|   # prefix must match a valid repository path format, either standard style | ||||
|   # schema://host/path/.. or ^/path/.. specifying a path relative to the | ||||
|   # root of the working directory repository.  In the second form, allow the | ||||
|   # leading '^' be escaped in case the user has the extendedglob option set. | ||||
|   [[ -prefix *://*/ ]] || | ||||
|   [[ -f .svn/entries && ( -prefix '^/' || -prefix '\^/' ) ]] || | ||||
|   return 1 | ||||
| 
 | ||||
|   # return if remote access is not permitted | ||||
|   zstyle -T ":completion:${curcontext}:" remote-access || return 1 | ||||
| 
 | ||||
|   remfiles=( ${(f)"$(svn list $IPREFIX${PREFIX%%[^./][^/]#} 2>/dev/null)"} ) | ||||
|   remfiles=( ${(f)"$(svn list $IPREFIX${${PREFIX%%[^/]#}/#$pfx/$sub} 2>/dev/null)"} ) | ||||
|   (( $? == 0 )) || return 1 | ||||
| 
 | ||||
|   # you might consider trying to return early if $#remfiles is zero, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue