diff --git a/highlighters/main/parse.zsh b/highlighters/main/parse.zsh new file mode 100755 index 0000000..91db038 --- /dev/null +++ b/highlighters/main/parse.zsh @@ -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