mirror of
				git://git.code.sf.net/p/zsh/code
				synced 2025-10-31 06:00:54 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			460 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			460 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| # function zfput {
 | |
| # Simple put:  dump every file under the same name, but stripping
 | |
| # off any directory parts to get the remote filename (i.e. always
 | |
| # goes into current remote directory).  Use zfpcp to specify new
 | |
| # file name or new directory at remote end.
 | |
| 
 | |
| emulate -L zsh
 | |
| 
 | |
| local loc rem
 | |
| integer stat do_close
 | |
| 
 | |
| zfautocheck
 | |
| 
 | |
| for loc in $*; do
 | |
|   rem=${loc:t}
 | |
|   zftp put $rem <$loc
 | |
|   [[ $? == 0 ]] || stat=$?
 | |
| done
 | |
| 
 | |
| (( $do_close )) && zfclose
 | |
| 
 | |
| return $stat
 | |
| # }
 |