summaryrefslogtreecommitdiffstats
path: root/Completion/Unix/Command/_fmt
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2025-11-24 22:08:46 +0100
committerOliver Kiddle <opk@zsh.org>2025-11-24 22:10:27 +0100
commit5a1cbabead83d2479531579063a4540df6795d3d (patch)
tree83029e9b47f914fe67260adc46ccb9b660f385a8 /Completion/Unix/Command/_fmt
parent54092 (tweaked): _git: improve format completion (diff)
downloadzsh-5a1cbabead83d2479531579063a4540df6795d3d.tar
zsh-5a1cbabead83d2479531579063a4540df6795d3d.tar.gz
zsh-5a1cbabead83d2479531579063a4540df6795d3d.tar.bz2
zsh-5a1cbabead83d2479531579063a4540df6795d3d.tar.lz
zsh-5a1cbabead83d2479531579063a4540df6795d3d.tar.xz
zsh-5a1cbabead83d2479531579063a4540df6795d3d.tar.zst
zsh-5a1cbabead83d2479531579063a4540df6795d3d.zip
54094: handle rust coreutils in completions
Diffstat (limited to 'Completion/Unix/Command/_fmt')
-rw-r--r--Completion/Unix/Command/_fmt14
1 files changed, 12 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_fmt b/Completion/Unix/Command/_fmt
index 59d90ff83..643160ea3 100644
--- a/Completion/Unix/Command/_fmt
+++ b/Completion/Unix/Command/_fmt
@@ -7,9 +7,9 @@ local wopt="[specify maximum line width]:width [75]"
local sopt="[don't join short lines\: split only]"
args=( -A "-*" "(1 2)-w+$wopt" '*:file:_files' )
-_pick_variant -r variant gnu=GNU $OSTYPE --version
+_pick_variant -r variant gnu='GNU' uutils=uutils $OSTYPE --version
case $variant in
- gnu)
+ uutils|gnu)
args=(
'(-c --crown-margin)'{-c,--crown-margin}$copt
'(-w --width)'{-w+,--width=}$wopt
@@ -22,6 +22,16 @@ case $variant in
'(- *)--version[display version information]'
'*:file:_files'
)
+ ;|
+ uutils)
+ args+=(
+ '(-m --preserve-headers)'{-m,--preserve-headers}'[preserve mail headers in the input]'
+ '(-P --skip-prefix)'{-P+,--skip-prefix=}'[preserve lines beginning with given prefix]:prefix'
+ '(-x --exact-prefix)'{-x,--exact-prefix}'[with -p, match at the beginning of the line with no preceding whitespace]'
+ '(-X --exact-skip-prefix)'{-X,--exact-skip-prefix}'[with -P, match at the beginning of the line with no preceding whitespace]'
+ '(-q --quick)'{-q,--quick}'[break lines more quickly at the expense of a more ragged appearance]'
+ '(-T --tab-width)'{-T,--tab-width}'[specify width to treat tabs]:width [8]'
+ )
;;
solaris*)
args=(