diff options
author | Joe Rayhawk <jrayhawk@fairlystable.org> | 2025-04-30 02:07:56 -0700 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@fairlystable.org> | 2025-04-30 02:07:56 -0700 |
commit | 26e09889646be3ea65b4a3dfeda26213e4bb6a27 (patch) | |
tree | 4f3c73a9416bf47ad7e125383d23cf42879e38d7 /Completion/Unix/Command/_split | |
parent | 841bce705a58b04220b1f257abcc00ae71cbdbdc (diff) | |
parent | 001cba48ce3b964cf01fb3e2af54b20eacbc9bf5 (diff) | |
download | zsh-26e09889646be3ea65b4a3dfeda26213e4bb6a27.tar.gz zsh-26e09889646be3ea65b4a3dfeda26213e4bb6a27.zip |
Merge branch 'upstream' into debian
Diffstat (limited to 'Completion/Unix/Command/_split')
-rw-r--r-- | Completion/Unix/Command/_split | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Completion/Unix/Command/_split b/Completion/Unix/Command/_split index c5ab0dc9b..5d5afa436 100644 --- a/Completion/Unix/Command/_split +++ b/Completion/Unix/Command/_split @@ -8,7 +8,7 @@ _pick_variant -r variant gnu=GNU $OSTYPE --version args=( '-a+[generate suffixes of specified length]:length [2]' \ - '(-l -p -n)-b+[put specified size in bytes in each output file]:size (bytes)' \ + '(-l -p -n)-b+[put specified size in bytes in each output file]: :_numbers -u bytes size k m g' \ '(-b -p -n)-l+[put specified number of lines/records in each output file]:lines' \ '1:file:_files' \ '2: :_guard "^-*" "prefix [x]"' @@ -19,8 +19,8 @@ case $variant in args=( -C '(H -a --suffix-length)'{-a+,--suffix-length=}'[generate suffixes of specified length]:length [2]' '(H)--additional-suffix=[append an additional suffix to file names]:suffix' - '(H -b --bytes -C --line-bytes -l --lines -n --number)'{-b+,--bytes=}'[put specified size in bytes in each output file]:size (bytes)' - '(H -b --bytes -C --line-bytes -l --lines -n --number)'{-C+,--line-bytes=}'[put whole lines/records up to size limit in each output file]:size (bytes)' + '(H -b --bytes -C --line-bytes -l --lines -n --number)'{-b+,--bytes=}'[put specified size in each output file]: :_numbers -M "m\:{a-zA-Z}={A-Za-z}" -u bytes size {K,M,G,T,P,E,Z}{,B}' \ + '(H -b --bytes -C --line-bytes -l --lines -n --number)'{-C+,--line-bytes=}'[put whole lines/records up to size limit in each output file]: :_numbers -M "m\:{a-zA-Z}={A-Za-z}" -u bytes size {K,M,G,T,P,E,Z}{,B}' '(H --numeric-suffixes -x --hex-suffixes)-d[use numeric suffixes starting at 0]' '(H -d -x --hex-suffixes)--numeric-suffixes=-[use numeric suffixes]::start value [0]' '(H -d --numeric-suffixes --hex-suffixes)-x[use hex suffixes starting at 0]' @@ -39,15 +39,20 @@ case $variant in '(- 1 2)--version[display version information]' ) ;; - (free|net)bsd*) + (free|net)bsd*|darwin*) args+=( '(-b -l -p)-n+[generate specified number of output files]:output files' ) ;| darwin*|freebsd*) args+=( + '-d[use numeric suffixes]' '(-b -l -n)-p+[split the file whenever a line matches specified pattern]:pattern' ) ;| - freebsd*) args+=( '-d[use numeric suffixes]' ) ;; + freebsd*) + args+=( + "-c[continue creating files and don't overwrite existing output files]" + ) + ;; esac _arguments -s -S $args && ret=0 |