summaryrefslogtreecommitdiffstats
path: root/Completion/Unix/Command/_base64
diff options
context:
space:
mode:
authordana <dana@dana.is>2026-05-01 21:38:50 -0500
committerdana <dana@dana.is>2026-05-04 19:24:56 -0500
commit6eacb5bea90b62fb4c7c448d23084065e865fe33 (patch)
tree4c9a428d0f7dd2f9bf6a104a7b46658a32e3aa2b /Completion/Unix/Command/_base64
parentunposted: tests: Y01: fix test broken by _echo (diff)
downloadzsh-6eacb5bea90b62fb4c7c448d23084065e865fe33.tar
zsh-6eacb5bea90b62fb4c7c448d23084065e865fe33.tar.gz
zsh-6eacb5bea90b62fb4c7c448d23084065e865fe33.tar.bz2
zsh-6eacb5bea90b62fb4c7c448d23084065e865fe33.tar.lz
zsh-6eacb5bea90b62fb4c7c448d23084065e865fe33.tar.xz
zsh-6eacb5bea90b62fb4c7c448d23084065e865fe33.tar.zst
zsh-6eacb5bea90b62fb4c7c448d23084065e865fe33.zip
54448: completion: update base64, btrfs, emulate, tree
Diffstat (limited to 'Completion/Unix/Command/_base64')
-rw-r--r--Completion/Unix/Command/_base6438
1 files changed, 34 insertions, 4 deletions
diff --git a/Completion/Unix/Command/_base64 b/Completion/Unix/Command/_base64
index bbf100acb..6309d8022 100644
--- a/Completion/Unix/Command/_base64
+++ b/Completion/Unix/Command/_base64
@@ -8,7 +8,12 @@
local variant type=base${service//[^2346]/}
_pick_variant -r variant \
- gnu='(Free Soft|uutils)' fourmilab=fourmi darwin=-D unix --version
+ gnu='(Free Soft|uutils)' freebsd=FreeBSD netbsd='<wrap>' fourmilab=fourmi unix --version
+
+# as of macOS 13, Apple's base64 is based on FreeBSD's, and it reports that way,
+# but it's moderately customised so that it supports roughly the same options as
+# the base64 shell script they provided previously
+[[ $variant == (freebsd|unix) && $OSTYPE == darwin* ]] && variant=darwin
case $variant in
gnu)
@@ -27,17 +32,42 @@ case $variant in
darwin)
_arguments -s -S : \
'(: -)'{-h,--help}'[display help information]' \
+ '(: -)--version[display version information]' \
+ '(dec)' \
- '(enc)'{-D,--decode}"[decode input from $type]" \
+ '(enc)'{-d,-D,--decode}"[decode input from $type]" \
+ '(enc)' \
- '(dec)'{-b+,--break=}'[wrap encoded lines at specified number of columns]:number of columns' \
+ '(dec)'{-b+,-w+,--break=,--wrap=}'[wrap encoded lines at specified number of columns]:number of columns' \
+ '!(dec)--breaks=:number of columns' \
+ '(out)' \
{-o+,--output=}'[specify output file]:output file:_files' \
+ '(in)' \
- {-i+,--input=}'[specify input file]:input file:_files' \
+ {-i+,--input=}'[specify input file]:input file:_files'
+ return
+ ;;
+ freebsd)
+ _arguments -s -S -A '-*' : \
+ '(: -)--help[display help information]' \
+ '(: -)--version[display version information]' \
+ + dec \
+ '(enc -d --decode)'{-d,--decode}"[decode input from $type]" \
+ '!(enc)'{-i,--ignore-garbage} \
+ + '(enc)' \
+ '(dec)'{-w+,--wrap=}'[wrap encoded lines at specified number of columns]:number of columns' \
+ + in \
'1:input file:_files'
return
;;
+ netbsd)
+ _arguments -s -S -A '-*' : \
+ + dec \
+ '(enc -d -D)'{-d,-D}"[decode input from $type]" \
+ '(enc)-i[ignore irrelevant characters when decoding]' \
+ + '(enc)' \
+ '(dec)'{-b+,-w+}'[wrap encoded lines at specified number of columns]:number of columns' \
+ + in \
+ '*:input file:_files'
+ return
+ ;;
fourmilab)
_arguments -s -S : \
'(: -)--copyright[display copyright information]' \