aboutsummaryrefslogtreecommitdiffstats
path: root/.functions
diff options
context:
space:
mode:
authorPeter Kruithof <pkruithof@gmail.com>2012-03-28 14:45:17 +0300
committerPeter Kruithof <pkruithof@gmail.com>2012-03-28 14:45:17 +0300
commitb70515792cb15c080717668bc5b0c9eed55fc9ef (patch)
tree59a6d1e2b9f264c054bef820e10057125fca772d /.functions
parentb78d8cfd2f1e003228df9d4331e89e711f03dbec (diff)
downloaddotfiles-b70515792cb15c080717668bc5b0c9eed55fc9ef.tar.gz
dotfiles-b70515792cb15c080717668bc5b0c9eed55fc9ef.tar.bz2
dotfiles-b70515792cb15c080717668bc5b0c9eed55fc9ef.zip
Added codepoint function
Diffstat (limited to '.functions')
-rw-r--r--.functions5
1 files changed, 5 insertions, 0 deletions
diff --git a/.functions b/.functions
index 67e64d6..ef32e3a 100644
--- a/.functions
+++ b/.functions
@@ -62,4 +62,9 @@ function escape() {
function unidecode() {
perl -e "binmode(STDOUT, ':utf8'); print \"$@\""
echo # newline
+}
+
+# Get a character's unicode codepoint
+function codepoint() {
+ perl -e "use utf8; print sprintf('U+%04X', ord(\"$@\"))"
} \ No newline at end of file