diff options
author | dana <dana@dana.is> | 2018-06-04 10:04:27 -0500 |
---|---|---|
committer | Oliver Kiddle <okiddle@yahoo.co.uk> | 2018-06-07 18:19:55 +0200 |
commit | 64ef1eddfd4fa79a0720945e189cf7c3a44bde9c (patch) | |
tree | 9237ef4615c0643b783d5fac4f007f9cb4fc693d /Completion/Unix/Command/_base64 | |
parent | 594f2ff06e85bf27b154dd703ee3b2dd7f168bc0 (diff) | |
download | zsh-64ef1eddfd4fa79a0720945e189cf7c3a44bde9c.tar.gz zsh-64ef1eddfd4fa79a0720945e189cf7c3a44bde9c.tar.xz zsh-64ef1eddfd4fa79a0720945e189cf7c3a44bde9c.zip |
42931: completion for several utilities especially for checksums across a variety of systems
Diffstat (limited to 'Completion/Unix/Command/_base64')
-rw-r--r-- | Completion/Unix/Command/_base64 | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_base64 b/Completion/Unix/Command/_base64 new file mode 100644 index 000000000..47a650343 --- /dev/null +++ b/Completion/Unix/Command/_base64 @@ -0,0 +1,59 @@ +#compdef base64 gbase64 base32 gbase32 + +# Note: This does NOT cover `uuencode`/`uudecode`, which on some BSD systems +# have the aliases `b64encode`/`b64decode` — those are sufficiently different +# that they belong in another function. It DOES cover GNU's `base32`, since it +# is essentially the same program as their `base64`. + +local variant type=base${service//[^2346]/} + +_pick_variant -r variant \ + gnu='Free Soft' fourmilab=fourmi darwin=-D unix --version + +case $variant in + gnu) + _arguments -s -S : \ + '(: -)--help[display help information]' \ + '(: -)--version[display version information]' \ + + dec \ + '(enc -d --decode)'{-d,--decode}"[decode input from $type]" \ + '(enc -i --ignore-garbage)'{-i,--ignore-garbage}'[ignore irrelevant characters when decoding]' \ + + '(enc)' \ + '(dec)'{-w+,--wrap=}'[wrap encoded lines at specified number of columns]:number of columns' \ + + in \ + '1:input file:_files' + return + ;; + darwin) + _arguments -s -S : \ + '(: -)'{-h,--help}'[display help information]' \ + + '(dec)' \ + '(enc)'{-D,--decode}"[decode input from $type]" \ + + '(enc)' \ + '(dec)'{-b+,--break=}'[wrap encoded lines at specified number of columns]:number of columns' \ + + '(out)' \ + {-o+,--output=}'[specify output file]:output file:_files' \ + + '(in)' \ + {-i+,--input=}'[specify input file]:input file:_files' \ + '1:input file:_files' + return + ;; + fourmilab) + _arguments -s -S : \ + '(: -)--copyright[display copyright information]' \ + '(: -)'{-u,--help}'[display help information]' \ + '(: -)--version[display version information]' \ + + dec \ + '(enc -d --decode)'{-d,--decode}"[decode input from $type]" \ + '(enc -n --noerrcheck)'{-n,--noerrcheck}'[ignore errors when decoding]' \ + + '(enc)' \ + '(dec)'{-e,--encode}"[encode input to $type]" \ + + io \ + '1:input file:_files' \ + '2:output file:_files' + return + ;; +esac + +# A few other implementations exist, though they are rarely encountered +_default |