diff options
| author | dana <dana@dana.is> | 2025-05-22 05:19:47 -0500 |
|---|---|---|
| committer | dana <dana@dana.is> | 2025-06-03 01:59:01 -0500 |
| commit | 6600350d20772b0c7f0f0422c99622441b7560a2 (patch) | |
| tree | 6c8a2640b10f1dda0e7916de7eebc2db440a684b /Completion/Unix | |
| parent | 53713: ${ ... } should not clobber $REPLY (diff) | |
| download | zsh-6600350d20772b0c7f0f0422c99622441b7560a2.tar zsh-6600350d20772b0c7f0f0422c99622441b7560a2.tar.gz zsh-6600350d20772b0c7f0f0422c99622441b7560a2.tar.bz2 zsh-6600350d20772b0c7f0f0422c99622441b7560a2.tar.lz zsh-6600350d20772b0c7f0f0422c99622441b7560a2.tar.xz zsh-6600350d20772b0c7f0f0422c99622441b7560a2.tar.zst zsh-6600350d20772b0c7f0f0422c99622441b7560a2.zip | |
github #136: completion: add col
Diffstat (limited to 'Completion/Unix')
| -rw-r--r-- | Completion/Unix/Command/_col | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_col b/Completion/Unix/Command/_col new file mode 100644 index 000000000..2c8aa0659 --- /dev/null +++ b/Completion/Unix/Command/_col @@ -0,0 +1,26 @@ +#compdef col + +local variant +local -a args=( + '(-b --no-backspaces)'{-b,--no-backspaces}'[do not output backspaces]' + '(-f --fine)'{-f,--fine}'[permit forward half-line-feeds]' + '(-h -x --tabs --spaces)'{-h,--tabs}'[convert spaces to tabs]' + '(-l --lines)'{-l+,--lines=}'[buffer at least specified number of lines]: :_numbers -d128 lines' + '(-p --pass)'{-p,--pass}'[pass through unknown control sequences]' + '(-h -x --tabs --spaces)'{-x,--spaces}'[convert tabs to spaces]' + '(-)'{-H,--help}'[display usage information]' + '(-)'{-V,--version}'[display version information]' +) + +_pick_variant -r variant util-linux=no-backspaces freebsd=nline $OSTYPE --help + +case $variant in + util-linux) ;; + # Also Darwin, NetBSD, and DragonFly + freebsd) args=( ${args:#*\)(-[HV]|--*)[+=]#\[*} ) ;; + openbsd*) args=( ${args:#*\)(-[HpV]|--*)[+=]#\[*} ) ;; + # SUSv2, Solaris, etc + *) args=( ${args:#*\)(-[hHlV]|--*)[+=]#\[*} ) ;; +esac + +_arguments -s -S : $args |
