Improve patterns once again
This commit is contained in:
parent
110ce306a1
commit
6db1cab946
|
@ -1,5 +1,5 @@
|
|||
local REPLY
|
||||
zsocket ~/.mpvsock 2>&1 >/dev/null || return
|
||||
typeset -ga _cprompts_mpv=($REPLY)
|
||||
_cprompts_mpv[2]="${${$(print -u $_cprompts_mpv[1] '{ "command": ["get_property", "media-title"] }' && read -Eu $_cprompts_mpv[1])#*\"data\"[[:space:]]#:[[:space:]]#\"}%%\"[[:space:]]#(,|\})*}"
|
||||
_cprompts_mpv[2]="${${$(print -u $_cprompts_mpv[1] '{ "command": ["get_property", "media-title"] }' && read -Eu $_cprompts_mpv[1])#*\"data\"([^[:print:]])#:([^[:print:]])#\"}%%(\"~\\\")*}"
|
||||
[ -z $_cprompts_mpv[2] ] || p10k segment -b magenta -i '' -t "${_cprompts_mpv[2]:0:20}$([ ${#_cprompts_mpv[2]} -gt 20 ] && print ...)"
|
||||
|
|
Loading…
Reference in New Issue