nother error trap to prevent
This commit is contained in:
		
							parent
							
								
									8c47e82475
								
							
						
					
					
						commit
						4d0c5604d9
					
				| 
						 | 
					@ -146,8 +146,8 @@ _zsh_highlight_main__type() {
 | 
				
			||||||
      REPLY=none
 | 
					      REPLY=none
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  if ! (( $+REPLY )); then
 | 
					  if ! (( $+REPLY )); then	# below will frequently trigger ERR trap without || :
 | 
				
			||||||
    REPLY="${$(LC_ALL=C builtin type -w -- $1 2>/dev/null)#*: }"
 | 
					    REPLY="${$(LC_ALL=C builtin type -w -- $1 2>/dev/null || :)#*: }"
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  if (( $+_zsh_highlight_main__command_type_cache )); then
 | 
					  if (( $+_zsh_highlight_main__command_type_cache )); then
 | 
				
			||||||
    _zsh_highlight_main__command_type_cache[(e)$1]=$REPLY
 | 
					    _zsh_highlight_main__command_type_cache[(e)$1]=$REPLY
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -66,7 +66,7 @@ _zsh_highlight()
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Did a couple of tweaks to highlighters/main/main-highlighter.zsh
 | 
					# Did a couple of tweaks to highlighters/main/main-highlighter.zsh
 | 
				
			||||||
# to prevent need for following, thut there'll surely be others.
 | 
					# to prevent need for following, though there'll surely be others.
 | 
				
			||||||
# setopt localtraps
 | 
					# setopt localtraps
 | 
				
			||||||
# unfunction TRAPZERR
 | 
					# unfunction TRAPZERR
 | 
				
			||||||
  setopt localoptions noksharrays warncreateglobal
 | 
					  setopt localoptions noksharrays warncreateglobal
 | 
				
			||||||
| 
						 | 
					@ -337,7 +337,7 @@ _zsh_highlight_load_highlighters()
 | 
				
			||||||
  for highlighter_dir ($1/*/); do
 | 
					  for highlighter_dir ($1/*/); do
 | 
				
			||||||
    highlighter="${highlighter_dir:t}"
 | 
					    highlighter="${highlighter_dir:t}"
 | 
				
			||||||
    [[ -f "$highlighter_dir/${highlighter}-highlighter.zsh" ]] &&
 | 
					    [[ -f "$highlighter_dir/${highlighter}-highlighter.zsh" ]] &&
 | 
				
			||||||
      . "$highlighter_dir/${highlighter}-highlighter.zsh"
 | 
					      source "$highlighter_dir/${highlighter}-highlighter.zsh"
 | 
				
			||||||
    if type "_zsh_highlight_highlighter_${highlighter}_paint" &> /dev/null &&
 | 
					    if type "_zsh_highlight_highlighter_${highlighter}_paint" &> /dev/null &&
 | 
				
			||||||
       type "_zsh_highlight_highlighter_${highlighter}_predicate" &> /dev/null;
 | 
					       type "_zsh_highlight_highlighter_${highlighter}_predicate" &> /dev/null;
 | 
				
			||||||
    then
 | 
					    then
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue