mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2025-11-04 21:31:19 +08:00 
			
		
		
		
	catimg: fix exit without using source
supresses errors from convert whilen converting, as they are usually just warnings
This commit is contained in:
		
							parent
							
								
									349fa15b18
								
							
						
					
					
						commit
						44b23ae194
					
				@ -9,7 +9,7 @@
 | 
			
		||||
 | 
			
		||||
if [[ -x  `which convert` ]]; then
 | 
			
		||||
  function catimg() {
 | 
			
		||||
    source $ZSH/plugins/catimg/catimg.sh $@
 | 
			
		||||
    zsh $ZSH/plugins/catimg/catimg.sh $@
 | 
			
		||||
  }
 | 
			
		||||
else
 | 
			
		||||
  echo "catimg need convert (ImageMagick) to work)"
 | 
			
		||||
 | 
			
		||||
@ -59,7 +59,7 @@ fi
 | 
			
		||||
 | 
			
		||||
# Display the image
 | 
			
		||||
I=0
 | 
			
		||||
convert "$IMG" -resize $COLS\> +dither `echo $REMAP` txt:- |
 | 
			
		||||
convert "$IMG" -resize $COLS\> +dither `echo $REMAP` txt:- 2>/dev/null |
 | 
			
		||||
sed -e 's/.*none.*/NO NO NO/g' -e '1d;s/^.*(\(.*\)[,)].*$/\1/g;y/,/ /' |
 | 
			
		||||
while read R G B f; do
 | 
			
		||||
  if [ ! "$R" = "NO" ]; then
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user