'main': main-highlighter can be run from command line
This commit is contained in:
parent
2176692704
commit
06faf7bd24
16
highlighters/main/parse.zsh
Executable file
16
highlighters/main/parse.zsh
Executable 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
|
Loading…
Reference in New Issue
Block a user