aboutsummaryrefslogtreecommitdiffstats
path: root/src/_uuidgen
diff options
context:
space:
mode:
authorShohei YOSHIDA <syohex@gmail.com>2024-11-14 18:10:40 +0900
committerShohei YOSHIDA <syohex@gmail.com>2024-11-14 18:10:40 +0900
commit2c2d87889a7e12a3269817ea506693a5cfe01cc2 (patch)
treef055afe71c8eb2a8e8b32fb278229c6f4ce6e1fc /src/_uuidgen
parentAdd lscpu completion (diff)
downloadzsh-completions-2c2d87889a7e12a3269817ea506693a5cfe01cc2.tar
zsh-completions-2c2d87889a7e12a3269817ea506693a5cfe01cc2.tar.gz
zsh-completions-2c2d87889a7e12a3269817ea506693a5cfe01cc2.tar.bz2
zsh-completions-2c2d87889a7e12a3269817ea506693a5cfe01cc2.tar.lz
zsh-completions-2c2d87889a7e12a3269817ea506693a5cfe01cc2.tar.xz
zsh-completions-2c2d87889a7e12a3269817ea506693a5cfe01cc2.tar.zst
zsh-completions-2c2d87889a7e12a3269817ea506693a5cfe01cc2.zip
Consider macOS's uuidgen
Diffstat (limited to 'src/_uuidgen')
-rw-r--r--src/_uuidgen30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/_uuidgen b/src/_uuidgen
index 15c5865..5e9d498 100644
--- a/src/_uuidgen
+++ b/src/_uuidgen
@@ -34,17 +34,25 @@
#
# ------------------------------------------------------------------------------
-_arguments \
- '(- *)'{-h,--help}'[display this help]' \
- '(- *)'{-V,--version}'[display version]' \
- '(-r --random)'{-r,--random}'[generate random-based uuid]' \
- '(-t --time)'{-t,--time}'[generate time-based uuid]' \
- '(-n --namespace)'{-n,--namespace}'[generate hash-based uuid in this namespace]:namespace:(@dns @url @oid @x500)' \
- '(-N --name)'{-n,--name}'[generate hash-based uuid from this name]:name' \
- '(-C --count -s --sha1 -m --md5)'{-m,--md5}'[generate md5 hash]' \
- '(-C --count -s --sha1 -m --md5)'{-C,--count}'[generate more uuids in loop]:count' \
- '(-C --count -s --sha1 -m --md5)'{-s,--sha1}'[generate sha1 hash]' \
- '(-x --hex)'{-h,--hex}'[interpret name as hex string]'
+case $OSTYPE in
+ (darwin*)
+ _arguments \
+ '-hdr[emit result in form suitable for copying into a header]'
+ ;;
+ (*)
+ _arguments \
+ '(- *)'{-h,--help}'[display this help]' \
+ '(- *)'{-V,--version}'[display version]' \
+ '(-r --random)'{-r,--random}'[generate random-based uuid]' \
+ '(-t --time)'{-t,--time}'[generate time-based uuid]' \
+ '(-n --namespace)'{-n,--namespace}'[generate hash-based uuid in this namespace]:namespace:(@dns @url @oid @x500)' \
+ '(-N --name)'{-n,--name}'[generate hash-based uuid from this name]:name' \
+ '(-C --count -s --sha1 -m --md5)'{-m,--md5}'[generate md5 hash]' \
+ '(-C --count -s --sha1 -m --md5)'{-C,--count}'[generate more uuids in loop]:count' \
+ '(-C --count -s --sha1 -m --md5)'{-s,--sha1}'[generate sha1 hash]' \
+ '(-x --hex)'{-h,--hex}'[interpret name as hex string]'
+ ;;
+esac
# Local Variables:
# mode: Shell-Script