This commit is contained in:
psprint 2017-04-10 13:25:48 +00:00 committed by GitHub
commit e2146f968d

16
highlighters/main/parse.zsh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/zsh
source "../../zsh-syntax-highlighting.zsh"
if [ -n "$1" ]; then
# Load from given file
PREBUFFER=""
BUFFER="$(<$1)"
_zsh_highlight_main_highlighter
# This output can be diffed to detect changes in operation
print -rl -- "${region_highlight[@]}"
else
echo "Usage: ./parse.zsh {file}"
fi