mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-02-13 10:05:31 +08:00
17 lines
330 B
Bash
Executable File
17 lines
330 B
Bash
Executable File
#!/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
|