| Server IP : 199.250.200.62 / Your IP : 216.73.217.89 Web Server : Apache System : Linux vps37394.inmotionhosting.com 3.10.0-1160.119.1.vz7.224.4 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64 User : jasonp18 ( 1000) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/share/zsh/5.0.2/functions/ |
Upload File : |
# Make hex integers appear as 0x...
setopt localoptions cbases
integer -g _insert_unicode_ready
if [[ $LASTWIDGET = insert-unicode-char && $_insert_unicode_ready -eq 1 ]]
then
# Second call; we should have a usable prefix.
# If we don't, give up.
(( ${+NUMERIC} )) || return 1
# Convert it back to hex, padded with zeroes to 8 digits plus the 0x...
local -i 16 -Z 10 arg=$NUMERIC
# ...and use print to turn this into a Unicode character.
LBUFFER+="$(print -n "\U${arg##0x}")"
_insert_unicode_ready=0
else
# Set the base to 16...
zle argument-base 16
# ...wait for user to type hex keys then call this widget again.
zle universal-argument
_insert_unicode_ready=1
fi