1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 10:01:11 +02:00

45535: _lz4: Order compression levels numerically

This commit is contained in:
dana 2020-03-13 09:34:52 -05:00
parent c2e46ee43b
commit cb7aadfd2a
2 changed files with 10 additions and 2 deletions

View file

@ -1,5 +1,8 @@
2020-03-13 dana <dana@dana.is> 2020-03-13 dana <dana@dana.is>
* 45535: Completion/Unix/Command/_lz4: Order compression levels
numerically
* 45534: Completion/Darwin/Command/_hdiutil: Update image-file * 45534: Completion/Darwin/Command/_hdiutil: Update image-file
extensions, image/disk formats, &c. extensions, image/disk formats, &c.

View file

@ -42,8 +42,8 @@ args=(
'(b t -k --keep)--rm[remove source file]' '(b t -k --keep)--rm[remove source file]'
'!(b t -c --stdout)--to-stdout' '!(b t -c --stdout)--to-stdout'
+ b # Benchmark-mode options + b # Benchmark-mode options
"(C c d t)-b-[benchmark file using specified compression level]::compression level:(${(j< >)levels//-/})" "(C c d t)-b-[benchmark file using specified compression level]:: :->levels"
"(C c d t)-e-[specify upper compression level limit (with -b)]:compression level:(${(j< >)levels//-/})" "(C c d t)-e-[specify upper compression level limit (with -b)]: :->levels"
'(C c d t)-i-[specify minimum evaluation time (with -b)]:evaluation time (seconds)' '(C c d t)-i-[specify minimum evaluation time (with -b)]:evaluation time (seconds)'
+ c # Compress-mode options + c # Compress-mode options
"(b d t ${(j< >)levels} -c0 -c1 -c2 -hc)"${^levels} "(b d t ${(j< >)levels} -c0 -c1 -c2 -hc)"${^levels}
@ -98,6 +98,11 @@ case $state in
_message 'no more arguments' && ret=0 _message 'no more arguments' && ret=0
fi fi
;; ;;
levels)
_wanted levels expl 'compression level' \
compadd -o numeric - ${levels/#-/} \
&& ret=0
;;
esac esac
return ret return ret