aboutsummaryrefslogtreecommitdiff
path: root/base/zsh
diff options
context:
space:
mode:
authorAdam Hovorka <[email protected]>2018-09-30 20:36:27 -0600
committerAdam Hovorka <[email protected]>2018-09-30 20:36:27 -0600
commit9c1224578330135406ddc9f461184ff1f6756c0c (patch)
tree0afbaceff14b98919c04048bdf5d11a5a850289c /base/zsh
parentfc7fc47c946f49040df60dc3e3c4499399975125 (diff)
Add some more random utilities/functions
Diffstat (limited to 'base/zsh')
-rw-r--r--base/zsh/functions.zsh6
1 files changed, 6 insertions, 0 deletions
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 <number-to-convert>'; fi
+}