From 9c1224578330135406ddc9f461184ff1f6756c0c Mon Sep 17 00:00:00 2001 From: Adam Hovorka Date: Sun, 30 Sep 2018 20:36:27 -0600 Subject: Add some more random utilities/functions --- base/zsh/functions.zsh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'base/zsh/functions.zsh') diff --git a/base/zsh/functions.zsh b/base/zsh/functions.zsh index f705d28..db4271e 100644 --- a/base/zsh/functions.zsh +++ b/base/zsh/functions.zsh @@ -19,3 +19,9 @@ function trash { wttr() { curl -q -H "Accept-Language: ${LANG%_*}" wttr.in/"${1:-Pleasant Grove}\?${2:-0q}" } + +hex() { + emulate -L zsh + if [[ -n "$1" ]]; then printf "%X\n" $1 + else print 'Usage: hex '; fi +} -- cgit v1.2.3-70-g09d2