*highlight: Properly handle tokens with :. Don't add future tokens

This commit is contained in:
Sebastian Gniazdowski 2016-10-30 14:28:38 +01:00
parent 35058d6632
commit 3d2ac47621

View file

@ -145,7 +145,7 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=(
fi
fi
[[ -z "$REPLY" ]] && REPLY="${$(LC_ALL=C builtin type -w -- $1 2>/dev/null)#*: }"
[[ -z "$REPLY" ]] && REPLY="${$(LC_ALL=C builtin type -w -- $1 2>/dev/null)##*: }"
__hsmw_highlight_main__command_type_cache[(e)$1]=$REPLY
}
@ -488,7 +488,7 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=(
;;
*)
# ADD
reply+=("$start_pos $end_pos commandtypefromthefuture-$REPLY")
# reply+=("$start_pos $end_pos commandtypefromthefuture-$REPLY")
already_added=1
;;
esac