Skip to content

Instantly share code, notes, and snippets.

@jaseg
Last active March 23, 2016 10:08
Show Gist options
  • Save jaseg/5296519 to your computer and use it in GitHub Desktop.
Save jaseg/5296519 to your computer and use it in GitHub Desktop.
zsh unicode table using only zsnexpn(1) in <140 characters

The following line produces a unicode table (decimal value and unicode characters) using only zsh * expansion, * substitution and the print-builtin.

setopt extendedglob histsubstpattern multibyte
print -ac ${${(A)=u::={5126..5743}}:s/#%(#b)(*)/'${(r:6:m)match[1]}${(#mr:4:)match[1]}'/}

Output:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment