aboutsummaryrefslogtreecommitdiff
path: root/base/zsh
diff options
context:
space:
mode:
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
+}