mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2024-05-11 05:55:17 +00:00 
			
		
		
		
	fix(vi-mode): ignore clip* function errors in yank and put widgets
				
					
				
			Fixes #9605
This commit is contained in:
		@@ -100,13 +100,13 @@ function wrap_clipboard_widgets() {
 | 
			
		||||
      eval "
 | 
			
		||||
        function ${wrapped_name}() {
 | 
			
		||||
          zle .${widget}
 | 
			
		||||
          printf %s \"\${CUTBUFFER}\" | clipcopy
 | 
			
		||||
          printf %s \"\${CUTBUFFER}\" | clipcopy 2>/dev/null || true
 | 
			
		||||
        }
 | 
			
		||||
      "
 | 
			
		||||
    else
 | 
			
		||||
      eval "
 | 
			
		||||
        function ${wrapped_name}() {
 | 
			
		||||
          CUTBUFFER=\"\$(clippaste)\"
 | 
			
		||||
          CUTBUFFER=\"\$(clippaste 2>/dev/null || echo \$CUTBUFFER)\"
 | 
			
		||||
          zle .${widget}
 | 
			
		||||
        }
 | 
			
		||||
      "
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user