You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
668 B

  1. # vim:ft=zsh:et:sw=4
  2. (( next_word = 2 | 8192 ))
  3. [[ "$__arg_type" = 3 ]] && return 2
  4. local __first_call="$1" __wrd="$2" __start_pos="$3" __end_pos="$4"
  5. if (( __first_call )) || [[ "$__wrd" = -* ]]; then
  6. return 1
  7. else
  8. if (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then
  9. return 1
  10. fi
  11. if [[ -d "${XDG_CONFIG_HOME:-$HOME/.config}/autorandr/$__wrd" ]] then
  12. (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \
  13. && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}correct-subtle]}")
  14. fi
  15. fi
  16. (( this_word = next_word ))
  17. _start_pos=$_end_pos
  18. return 0