about summary refs log tree commit diff
path: root/Completion/Unix/Command/_git
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2021-11-24 23:07:18 +0100
committerOliver Kiddle <opk@zsh.org>2021-11-24 23:09:38 +0100
commit16d5d6a9dae526355caf16f2de9d57d84b5d9993 (patch)
tree6ab30a2ad2596523b85aa553ffa8a4544632fd7a /Completion/Unix/Command/_git
parent138f5bf144589a59ef009f26332652291cd0a944 (diff)
downloadzsh-16d5d6a9dae526355caf16f2de9d57d84b5d9993.tar.gz
zsh-16d5d6a9dae526355caf16f2de9d57d84b5d9993.tar.xz
zsh-16d5d6a9dae526355caf16f2de9d57d84b5d9993.zip
49597: add a helper for completing numbers with unit suffixes and separate out defaults, ranges and units in completion descriptions
Diffstat (limited to 'Completion/Unix/Command/_git')
-rw-r--r--Completion/Unix/Command/_git6
1 files changed, 3 insertions, 3 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 7c7fb22bc..c757376b0 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -3720,8 +3720,8 @@ _git-fast-import () {
                                                            now\:"use current time and timezone"' \
     '--done[terminate with error if there is no "done" command at the end of the stream]' \
     '--force[force updating modified existing branches]' \
-    '--max-pack-size=-[maximum size of each packfile]: : __git_guard_bytes' \
-    '--big-file-threshold=-[maximum size of blob to create deltas for]: : __git_guard_bytes' \
+    '--max-pack-size=-[maximum size of each packfile]: : __git_guard_bytes -d unlimited size' \
+    '--big-file-threshold=-[maximum size of blob to create deltas for]: : __git_guard_bytes -d 512m size' \
     '--depth=-[maximum delta depth for blob and tree deltification]: :__git_guard_number "maximum delta depth"' \
     '--active-branches=-[maximum number of branches to maintain active at once]: :__git_guard_number "maximum number of branches"' \
     '--export-marks=-[dump internal marks table when complete]: :_files' \
@@ -7506,7 +7506,7 @@ __git_guard_number () {
 
 (( $+functions[__git_guard_bytes] )) ||
 __git_guard_bytes () {
-  _guard '[[:digit:]]#([kKmMgG]|)' ${*:-size}
+  _numbers -u bytes ${*:-size} k m g
 }
 
 (( $+functions[__git_datetimes] )) ||