mirror of
https://github.com/zdharma-continuum/zinit.git
synced 2026-09-10 07:36:38 -04:00
fix: update pygmentize flags in glance subcommand (#488)
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
This commit is contained in:
parent
824d9d3617
commit
b773763bdc
|
|
@ -765,6 +765,7 @@ Has 39 line(s). Calls functions:
|
|||
.zinit-glance
|
||||
|-- zinit-side.zsh/.zinit-exists-physically-message
|
||||
|-- zinit-side.zsh/.zinit-first
|
||||
|-- zinit.zsh/+zinit-message
|
||||
`-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
|
|
|||
|
|
@ -189,6 +189,7 @@ Called by:
|
|||
zinit-autoload.zsh/.zinit-cd
|
||||
zinit-autoload.zsh/.zinit-confirm
|
||||
zinit-autoload.zsh/.zinit-delete
|
||||
zinit-autoload.zsh/.zinit-glance
|
||||
zinit-autoload.zsh/.zinit-self-update
|
||||
zinit-autoload.zsh/.zinit-show-zstatus
|
||||
zinit-autoload.zsh/.zinit-uninstall-completions
|
||||
|
|
|
|||
|
|
@ -3048,7 +3048,7 @@ EOF
|
|||
.zinit-exists-physically-message "$user" "$plugin" || return 1
|
||||
|
||||
.zinit-first "$1" "$2" || {
|
||||
builtin print "${ZINIT[col-error]}No source file found, cannot glance${ZINIT[col-rst]}"
|
||||
+zinit-message '{log-err} No source file found, cannot glance'
|
||||
return 1
|
||||
}
|
||||
|
||||
|
|
@ -3059,17 +3059,17 @@ EOF
|
|||
|
||||
{
|
||||
if (( ${+commands[pygmentize]} )); then
|
||||
builtin print "Glancing with ${ZINIT[col-info]}pygmentize${ZINIT[col-rst]}"
|
||||
pygmentize -l bash -g "$fname"
|
||||
+zinit-message "{log-info} Inspecting via {cmd}pygmentize{rst}"
|
||||
pygmentize -l 'bash' "$fname"
|
||||
elif (( ${+commands[highlight]} )); then
|
||||
builtin print "Glancing with ${ZINIT[col-info]}highlight${ZINIT[col-rst]}"
|
||||
+zinit-message "{log-info} Inspecting via {cmd}highlight{rst}"
|
||||
if (( has_256_colors )); then
|
||||
highlight -q --force -S sh -O xterm256 "$fname"
|
||||
highlight --force --output-format xterm256 --quiet --syntax sh "$fname"
|
||||
else
|
||||
highlight -q --force -S sh -O ansi "$fname"
|
||||
highlight --force --output-format ansi --quiet --syntax sh "$fname"
|
||||
fi
|
||||
elif (( ${+commands[source-highlight]} )); then
|
||||
builtin print "Glancing with ${ZINIT[col-info]}source-highlight${ZINIT[col-rst]}"
|
||||
+zinit-message "{log-info} Inspecting via {cmd}source-highlight{rst}"
|
||||
source-highlight -fesc --failsafe -s zsh -o STDOUT -i "$fname"
|
||||
else
|
||||
cat "$fname"
|
||||
|
|
|
|||
Loading…
Reference in a new issue