borg.fish 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  1. # Completions for borg
  2. # https://www.borgbackup.org/
  3. # Note:
  4. # Listing archives works on password protected repositories only if $BORG_PASSPHRASE is set.
  5. # Install:
  6. # Copy this file to /usr/share/fish/vendor_completions.d/
  7. # Commands
  8. complete -c borg -f -n __fish_is_first_token -a 'analyze' -d 'Analyze archives to find "hot spots"'
  9. complete -c borg -f -n __fish_is_first_token -a 'create' -d 'Create a new archive'
  10. complete -c borg -f -n __fish_is_first_token -a 'extract' -d 'Extract archive contents'
  11. complete -c borg -f -n __fish_is_first_token -a 'check' -d 'Check repository consistency'
  12. complete -c borg -f -n __fish_is_first_token -a 'rename' -d 'Rename an existing archive'
  13. complete -c borg -f -n __fish_is_first_token -a 'list' -d 'List archive or repository contents'
  14. complete -c borg -f -n __fish_is_first_token -a 'diff' -d 'Find differences between archives'
  15. complete -c borg -f -n __fish_is_first_token -a 'delete' -d 'Delete an archive'
  16. complete -c borg -f -n __fish_is_first_token -a 'prune' -d 'Prune repository archives'
  17. complete -c borg -f -n __fish_is_first_token -a 'compact' -d 'Free repository space'
  18. complete -c borg -f -n __fish_is_first_token -a 'info' -d 'Show archive details'
  19. complete -c borg -f -n __fish_is_first_token -a 'mount' -d 'Mount archive or a repository'
  20. complete -c borg -f -n __fish_is_first_token -a 'umount' -d 'Un-mount the mounted archive'
  21. complete -c borg -f -n __fish_is_first_token -a 'repo-compress' -d 'Repository (re-)compression'
  22. complete -c borg -f -n __fish_is_first_token -a 'repo-create' -d 'Create a new, empty repository'
  23. complete -c borg -f -n __fish_is_first_token -a 'repo-delete' -d 'Delete a repository'
  24. complete -c borg -f -n __fish_is_first_token -a 'repo-info' -d 'Show repository information'
  25. complete -c borg -f -n __fish_is_first_token -a 'repo-list' -d 'List repository contents'
  26. complete -c borg -f -n __fish_is_first_token -a 'repo-space' -d 'Manage reserved space in a repository'
  27. complete -c borg -f -n __fish_is_first_token -a 'tag' -d 'Tag archives'
  28. complete -c borg -f -n __fish_is_first_token -a 'transfer' -d 'Transfer of archives from another repository'
  29. complete -c borg -f -n __fish_is_first_token -a 'undelete' -d 'Undelete archives'
  30. complete -c borg -f -n __fish_is_first_token -a 'version' -d 'Display borg client version / borg server version'
  31. function __fish_borg_seen_key
  32. if __fish_seen_subcommand_from key
  33. and not __fish_seen_subcommand_from import export change-passphrase
  34. return 0
  35. end
  36. return 1
  37. end
  38. complete -c borg -f -n __fish_is_first_token -a 'key' -d 'Manage a repository key'
  39. complete -c borg -f -n __fish_borg_seen_key -a 'import' -d 'Import a repository key'
  40. complete -c borg -f -n __fish_borg_seen_key -a 'export' -d 'Export a repository key'
  41. complete -c borg -f -n __fish_borg_seen_key -a 'change-passphrase' -d 'Change key file passphrase'
  42. complete -c borg -f -n __fish_is_first_token -a 'serve' -d 'Start in server mode'
  43. complete -c borg -f -n __fish_is_first_token -a 'recreate' -d 'Recreate contents of existing archives'
  44. complete -c borg -f -n __fish_is_first_token -a 'export-tar' -d 'Create tarball from an archive'
  45. complete -c borg -f -n __fish_is_first_token -a 'with-lock' -d 'Run a command while repository lock held'
  46. complete -c borg -f -n __fish_is_first_token -a 'break-lock' -d 'Break the repository lock'
  47. function __fish_borg_seen_benchmark
  48. if __fish_seen_subcommand_from benchmark
  49. and not __fish_seen_subcommand_from crud
  50. return 0
  51. end
  52. return 1
  53. end
  54. complete -c borg -f -n __fish_is_first_token -a 'benchmark' -d 'Benchmark borg operations'
  55. complete -c borg -f -n __fish_borg_seen_benchmark -a 'crud' -d 'Benchmark borg CRUD operations'
  56. function __fish_borg_seen_help
  57. if __fish_seen_subcommand_from help
  58. and not __fish_seen_subcommand_from patterns placeholders compression
  59. return 0
  60. end
  61. return 1
  62. end
  63. complete -c borg -f -n __fish_is_first_token -a 'help' -d 'Miscellaneous Help'
  64. complete -c borg -f -n __fish_borg_seen_help -a 'patterns' -d 'Help for patterns'
  65. complete -c borg -f -n __fish_borg_seen_help -a 'placeholders' -d 'Help for placeholders'
  66. complete -c borg -f -n __fish_borg_seen_help -a 'compression' -d 'Help for compression'
  67. # Common options
  68. complete -c borg -f -s h -l 'help' -d 'Show help information'
  69. complete -c borg -f -l 'version' -d 'Show version information'
  70. complete -c borg -f -l 'critical' -d 'Log level CRITICAL'
  71. complete -c borg -f -l 'error' -d 'Log level ERROR'
  72. complete -c borg -f -l 'warning' -d 'Log level WARNING (default)'
  73. complete -c borg -f -l 'info' -d 'Log level INFO'
  74. complete -c borg -f -s v -l 'verbose' -d 'Log level INFO'
  75. complete -c borg -f -l 'debug' -d 'Log level DEBUG'
  76. complete -c borg -f -l 'debug-topic' -d 'Enable TOPIC debugging'
  77. complete -c borg -f -s p -l 'progress' -d 'Show progress information'
  78. complete -c borg -f -l 'iec' -d 'Format using IEC units (1KiB = 1024B)'
  79. complete -c borg -f -l 'log-json' -d 'Output one JSON object per log line'
  80. complete -c borg -f -l 'lock-wait' -d 'Wait for lock max N seconds [1]'
  81. complete -c borg -f -l 'show-version' -d 'Log version information'
  82. complete -c borg -f -l 'show-rc' -d 'Log the return code'
  83. complete -c borg -f -l 'umask' -d 'Set umask to M [0077]'
  84. complete -c borg -l 'remote-path' -d 'Use PATH as remote borg executable'
  85. complete -c borg -f -l 'upload-ratelimit' -d 'Set network upload rate limit in kiByte/s'
  86. complete -c borg -f -l 'upload-buffer' -d 'Set network upload buffer size in MiB'
  87. complete -c borg -l 'debug-profile' -d 'Write execution profile into FILE'
  88. complete -c borg -l 'rsh' -d 'Use COMMAND instead of ssh'
  89. complete -c borg -l 'socket' -d 'Use UNIX DOMAIN socket at PATH'
  90. # borg analyze options
  91. complete -c borg -f -s a -l 'match-archives' -d 'Only archive names matching PATTERN' -n "__fish_seen_subcommand_from analyze"
  92. set -l sort_keys "timestamp archive name id tags host user"
  93. complete -c borg -f -l 'sort-by' -d 'Sorting KEYS [timestamp]' -a "$sort_keys" -n "__fish_seen_subcommand_from analyze"
  94. complete -c borg -f -l 'first' -d 'Only first N archives' -n "__fish_seen_subcommand_from analyze"
  95. complete -c borg -f -l 'last' -d 'Only last N archives' -n "__fish_seen_subcommand_from analyze"
  96. complete -c borg -f -l 'oldest' -d 'Consider archives within TIMESPAN from oldest' -n "__fish_seen_subcommand_from analyze"
  97. complete -c borg -f -l 'newest' -d 'Consider archives within TIMESPAN from newest' -n "__fish_seen_subcommand_from analyze"
  98. complete -c borg -f -l 'older' -d 'Consider archives older than TIMESPAN' -n "__fish_seen_subcommand_from analyze"
  99. complete -c borg -f -l 'newer' -d 'Consider archives newer than TIMESPAN' -n "__fish_seen_subcommand_from analyze"
  100. # borg repo-compress options
  101. # Define compression methods once at the top
  102. set -l compression_methods "none auto lz4 zstd,1 zstd,2 zstd,3 zstd,4 zstd,5 zstd,6 zstd,7 zstd,8 zstd,9 zstd,10 zstd,11 zstd,12 zstd,13 zstd,14 zstd,15 zstd,16 zstd,17 zstd,18 zstd,19 zstd,20 zstd,21 zstd,22 zlib,1 zlib,2 zlib,3 zlib,4 zlib,5 zlib,6 zlib,7 zlib,8 zlib,9 lzma,0 lzma,1 lzma,2 lzma,3 lzma,4 lzma,5 lzma,6 lzma,7 lzma,8 lzma,9"
  103. complete -c borg -f -s C -l 'compression' -d 'Select compression ALGORITHM,LEVEL [lz4]' -a "$compression_methods" -n "__fish_seen_subcommand_from repo-compress"
  104. complete -c borg -f -s s -l 'stats' -d 'Print statistics' -n "__fish_seen_subcommand_from repo-compress"
  105. # borg create options
  106. complete -c borg -f -s n -l 'dry-run' -d 'Do not create a backup archive' -n "__fish_seen_subcommand_from create"
  107. complete -c borg -f -s s -l 'stats' -d 'Print verbose statistics' -n "__fish_seen_subcommand_from create"
  108. complete -c borg -f -l 'list' -d 'Print verbose list of items' -n "__fish_seen_subcommand_from create"
  109. complete -c borg -f -l 'filter' -d 'Only items with given STATUSCHARS' -n "__fish_seen_subcommand_from create"
  110. complete -c borg -f -l 'json' -d 'Print verbose stats as json' -n "__fish_seen_subcommand_from create"
  111. complete -c borg -f -l 'stdin-name' -d 'Use NAME in archive for stdin data' -n "__fish_seen_subcommand_from create"
  112. complete -c borg -f -l 'content-from-command' -d 'Interpret PATH as command and store its stdout' -n "__fish_seen_subcommand_from create"
  113. # Exclusion options
  114. complete -c borg -s e -l 'exclude' -d 'Exclude paths matching PATTERN' -n "__fish_seen_subcommand_from create"
  115. complete -c borg -l 'exclude-from' -d 'Read exclude patterns from EXCLUDEFILE' -n "__fish_seen_subcommand_from create"
  116. complete -c borg -f -l 'pattern' -d 'Include/exclude paths matching PATTERN' -n "__fish_seen_subcommand_from create"
  117. complete -c borg -l 'patterns-from' -d 'Include/exclude paths from PATTERNFILE' -n "__fish_seen_subcommand_from create"
  118. complete -c borg -f -l 'exclude-caches' -d 'Exclude directories tagged as cache' -n "__fish_seen_subcommand_from create"
  119. complete -c borg -l 'exclude-if-present' -d 'Exclude directories that contain FILENAME' -n "__fish_seen_subcommand_from create"
  120. complete -c borg -f -l 'keep-exclude-tags' -d 'Keep tag files of excluded directories' -n "__fish_seen_subcommand_from create"
  121. complete -c borg -f -l 'exclude-nodump' -d 'Exclude files flagged NODUMP' -n "__fish_seen_subcommand_from create"
  122. # Filesystem options
  123. complete -c borg -f -s x -l 'one-file-system' -d 'Stay in the same file system' -n "__fish_seen_subcommand_from create"
  124. complete -c borg -f -l 'numeric-ids' -d 'Only store numeric user:group identifiers' -n "__fish_seen_subcommand_from create"
  125. complete -c borg -f -l 'noatime' -d 'Do not store atime' -n "__fish_seen_subcommand_from create"
  126. complete -c borg -f -l 'noctime' -d 'Do not store ctime' -n "__fish_seen_subcommand_from create"
  127. complete -c borg -f -l 'nobirthtime' -d 'Do not store creation date' -n "__fish_seen_subcommand_from create"
  128. complete -c borg -f -l 'nobsdflags' -d 'Do not store bsdflags' -n "__fish_seen_subcommand_from create"
  129. complete -c borg -f -l 'noacls' -d 'Do not read and store ACLs into archive' -n "__fish_seen_subcommand_from create"
  130. complete -c borg -f -l 'noxattrs' -d 'Do not read and store xattrs into archive' -n "__fish_seen_subcommand_from create"
  131. complete -c borg -f -l 'noflags' -d 'Do not store flags' -n "__fish_seen_subcommand_from create"
  132. set -l files_cache_mode "ctime,size,inode mtime,size,inode ctime,size mtime,size rechunk,ctime rechunk,mtime size disabled"
  133. complete -c borg -f -l 'files-cache' -d 'Operate files cache in MODE' -a "$files_cache_mode" -n "__fish_seen_subcommand_from create"
  134. complete -c borg -f -l 'read-special' -d 'Open device files like regular files' -n "__fish_seen_subcommand_from create"
  135. # Archive options
  136. complete -c borg -f -l 'comment' -d 'Add COMMENT to the archive' -n "__fish_seen_subcommand_from create"
  137. complete -c borg -f -l 'timestamp' -d 'Set creation TIME (yyyy-mm-ddThh:mm:ss)' -n "__fish_seen_subcommand_from create"
  138. complete -c borg -l 'timestamp' -d 'Set creation time by reference FILE' -n "__fish_seen_subcommand_from create"
  139. complete -c borg -f -l 'chunker-params' -d 'Chunker PARAMETERS [19,23,21,4095]' -n "__fish_seen_subcommand_from create"
  140. complete -c borg -f -s C -l 'compression' -d 'Select compression ALGORITHM,LEVEL [lz4]' -a "$compression_methods" -n "__fish_seen_subcommand_from create"
  141. # borg extract options
  142. complete -c borg -f -l 'list' -d 'Print verbose list of items' -n "__fish_seen_subcommand_from extract"
  143. complete -c borg -f -s n -l 'dry-run' -d 'Do not actually extract any files' -n "__fish_seen_subcommand_from extract"
  144. complete -c borg -f -l 'numeric-ids' -d 'Only obey numeric user:group identifiers' -n "__fish_seen_subcommand_from extract"
  145. complete -c borg -f -l 'nobsdflags' -d 'Do not extract/set bsdflags' -n "__fish_seen_subcommand_from extract"
  146. complete -c borg -f -l 'noflags' -d 'Do not extract/set flags' -n "__fish_seen_subcommand_from extract"
  147. complete -c borg -f -l 'noacls' -d 'Do not extract/set ACLs' -n "__fish_seen_subcommand_from extract"
  148. complete -c borg -f -l 'noxattrs' -d 'Do not extract/set xattrs' -n "__fish_seen_subcommand_from extract"
  149. complete -c borg -f -l 'stdout' -d 'Write all extracted data to stdout' -n "__fish_seen_subcommand_from extract"
  150. complete -c borg -f -l 'sparse' -d 'Create holes in output sparse file' -n "__fish_seen_subcommand_from extract"
  151. # Exclusion options
  152. complete -c borg -s e -l 'exclude' -d 'Exclude paths matching PATTERN' -n "__fish_seen_subcommand_from extract"
  153. complete -c borg -l 'exclude-from' -d 'Read exclude patterns from EXCLUDEFILE' -n "__fish_seen_subcommand_from extract"
  154. complete -c borg -l 'pattern' -d 'Include/exclude paths matching PATTERN' -n "__fish_seen_subcommand_from extract"
  155. complete -c borg -l 'patterns-from' -d 'Include/exclude paths from PATTERNFILE' -n "__fish_seen_subcommand_from extract"
  156. complete -c borg -f -l 'strip-components' -d 'Remove NUMBER of leading path elements' -n "__fish_seen_subcommand_from extract"
  157. # borg check options
  158. complete -c borg -f -l 'repository-only' -d 'Only perform repository checks' -n "__fish_seen_subcommand_from check"
  159. complete -c borg -f -l 'archives-only' -d 'Only perform archives checks' -n "__fish_seen_subcommand_from check"
  160. complete -c borg -f -l 'verify-data' -d 'Cryptographic integrity verification' -n "__fish_seen_subcommand_from check"
  161. complete -c borg -f -l 'repair' -d 'Attempt to repair found inconsistencies' -n "__fish_seen_subcommand_from check"
  162. complete -c borg -f -l 'max-duration' -d 'Partial repo check for max. SECONDS' -n "__fish_seen_subcommand_from check"
  163. # Archive filters
  164. complete -c borg -f -s P -l 'prefix' -d 'Only archive names starting with PREFIX' -n "__fish_seen_subcommand_from check"
  165. complete -c borg -f -s a -l 'match-archives' -d 'Only consider archives matching all patterns' -n "__fish_seen_subcommand_from check"
  166. set -l sort_keys "timestamp archive name id tags host user"
  167. complete -c borg -f -l 'sort-by' -d 'Sorting KEYS [timestamp]' -a "$sort_keys" -n "__fish_seen_subcommand_from check"
  168. complete -c borg -f -l 'first' -d 'Only first N archives' -n "__fish_seen_subcommand_from check"
  169. complete -c borg -f -l 'last' -d 'Only last N archives' -n "__fish_seen_subcommand_from check"
  170. complete -c borg -f -l 'oldest' -d 'Consider archives within TIMESPAN from oldest' -n "__fish_seen_subcommand_from check"
  171. complete -c borg -f -l 'newest' -d 'Consider archives within TIMESPAN from newest' -n "__fish_seen_subcommand_from check"
  172. complete -c borg -f -l 'older' -d 'Consider archives older than TIMESPAN' -n "__fish_seen_subcommand_from check"
  173. complete -c borg -f -l 'newer' -d 'Consider archives newer than TIMESPAN' -n "__fish_seen_subcommand_from check"
  174. # borg rename
  175. # no specific options
  176. # borg list options
  177. complete -c borg -f -l 'short' -d 'Only print file/directory names' -n "__fish_seen_subcommand_from list"
  178. complete -c borg -f -l 'format' -d 'Specify FORMAT for file listing' -n "__fish_seen_subcommand_from list"
  179. complete -c borg -f -l 'json' -d 'List contents in json format' -n "__fish_seen_subcommand_from list"
  180. complete -c borg -f -l 'json-lines' -d 'List contents in json lines format' -n "__fish_seen_subcommand_from list"
  181. # Archive filters
  182. complete -c borg -f -s P -l 'prefix' -d 'Only archive names starting with PREFIX' -n "__fish_seen_subcommand_from list"
  183. complete -c borg -f -s a -l 'match-archives' -d 'Only consider archives matching all patterns' -n "__fish_seen_subcommand_from list"
  184. set -l sort_keys "timestamp archive name id tags host user"
  185. complete -c borg -f -l 'sort-by' -d 'Sorting KEYS [timestamp]' -a "$sort_keys" -n "__fish_seen_subcommand_from list"
  186. complete -c borg -f -l 'first' -d 'Only first N archives' -n "__fish_seen_subcommand_from list"
  187. complete -c borg -f -l 'last' -d 'Only last N archives' -n "__fish_seen_subcommand_from list"
  188. complete -c borg -f -l 'oldest' -d 'Consider archives within TIMESPAN from oldest' -n "__fish_seen_subcommand_from list"
  189. complete -c borg -f -l 'newest' -d 'Consider archives within TIMESPAN from newest' -n "__fish_seen_subcommand_from list"
  190. complete -c borg -f -l 'older' -d 'Consider archives older than TIMESPAN' -n "__fish_seen_subcommand_from list"
  191. complete -c borg -f -l 'newer' -d 'Consider archives newer than TIMESPAN' -n "__fish_seen_subcommand_from list"
  192. # Exclusion options
  193. complete -c borg -s e -l 'exclude' -d 'Exclude paths matching PATTERN' -n "__fish_seen_subcommand_from list"
  194. complete -c borg -l 'exclude-from' -d 'Read exclude patterns from EXCLUDEFILE' -n "__fish_seen_subcommand_from list"
  195. complete -c borg -f -l 'pattern' -d 'Include/exclude paths matching PATTERN' -n "__fish_seen_subcommand_from list"
  196. complete -c borg -l 'patterns-from' -d 'Include/exclude paths from PATTERNFILE' -n "__fish_seen_subcommand_from list"
  197. # borg diff options
  198. complete -c borg -f -l 'numeric-ids' -d 'Only consider numeric user:group' -n "__fish_seen_subcommand_from diff"
  199. complete -c borg -f -l 'same-chunker-params' -d 'Override check of chunker parameters' -n "__fish_seen_subcommand_from diff"
  200. complete -c borg -f -l 'sort' -d 'Sort the output lines by file path' -n "__fish_seen_subcommand_from diff"
  201. complete -c borg -f -l 'json-lines' -d 'Format output as JSON Lines' -n "__fish_seen_subcommand_from diff"
  202. # Exclusion options
  203. complete -c borg -s e -l 'exclude' -d 'Exclude paths matching PATTERN' -n "__fish_seen_subcommand_from diff"
  204. complete -c borg -l 'exclude-from' -d 'Read exclude patterns from EXCLUDEFILE' -n "__fish_seen_subcommand_from diff"
  205. complete -c borg -f -l 'pattern' -d 'Include/exclude paths matching PATTERN' -n "__fish_seen_subcommand_from diff"
  206. complete -c borg -l 'patterns-from' -d 'Include/exclude paths from PATTERNFILE' -n "__fish_seen_subcommand_from diff"
  207. # borg delete options
  208. complete -c borg -f -s n -l 'dry-run' -d 'Do not change the repository' -n "__fish_seen_subcommand_from delete"
  209. complete -c borg -f -l 'list' -d 'Output verbose list of archives' -n "__fish_seen_subcommand_from delete"
  210. # Archive filters
  211. complete -c borg -f -s P -l 'prefix' -d 'Only archive names starting with PREFIX' -n "__fish_seen_subcommand_from delete"
  212. complete -c borg -f -s a -l 'match-archives' -d 'Only consider archives matching all patterns' -n "__fish_seen_subcommand_from delete"
  213. set -l sort_keys "timestamp archive name id tags host user"
  214. complete -c borg -f -l 'sort-by' -d 'Sorting KEYS [timestamp]' -a "$sort_keys" -n "__fish_seen_subcommand_from delete"
  215. complete -c borg -f -l 'first' -d 'Only first N archives' -n "__fish_seen_subcommand_from delete"
  216. complete -c borg -f -l 'last' -d 'Only last N archives' -n "__fish_seen_subcommand_from delete"
  217. complete -c borg -f -l 'oldest' -d 'Consider archives within TIMESPAN from oldest' -n "__fish_seen_subcommand_from delete"
  218. complete -c borg -f -l 'newest' -d 'Consider archives within TIMESPAN from newest' -n "__fish_seen_subcommand_from delete"
  219. complete -c borg -f -l 'older' -d 'Consider archives older than TIMESPAN' -n "__fish_seen_subcommand_from delete"
  220. complete -c borg -f -l 'newer' -d 'Consider archives newer than TIMESPAN' -n "__fish_seen_subcommand_from delete"
  221. # borg prune options
  222. complete -c borg -f -s n -l 'dry-run' -d 'Do not change the repository' -n "__fish_seen_subcommand_from prune"
  223. complete -c borg -f -l 'force' -d 'Force pruning of corrupted archives' -n "__fish_seen_subcommand_from prune"
  224. complete -c borg -f -s s -l 'stats' -d 'Print verbose statistics' -n "__fish_seen_subcommand_from prune"
  225. complete -c borg -f -l 'list' -d 'Print verbose list of items' -n "__fish_seen_subcommand_from prune"
  226. complete -c borg -f -l 'keep-within' -d 'Keep archives within time INTERVAL' -n "__fish_seen_subcommand_from prune"
  227. complete -c borg -f -l 'keep-last' -d 'NUMBER of secondly archives to keep' -n "__fish_seen_subcommand_from prune"
  228. complete -c borg -f -l 'keep-secondly' -d 'NUMBER of secondly archives to keep' -n "__fish_seen_subcommand_from prune"
  229. complete -c borg -f -l 'keep-minutely' -d 'NUMBER of minutely archives to keep' -n "__fish_seen_subcommand_from prune"
  230. complete -c borg -f -s H -l 'keep-hourly' -d 'NUMBER of hourly archives to keep' -n "__fish_seen_subcommand_from prune"
  231. complete -c borg -f -s d -l 'keep-daily' -d 'NUMBER of daily archives to keep' -n "__fish_seen_subcommand_from prune"
  232. complete -c borg -f -s w -l 'keep-weekly' -d 'NUMBER of weekly archives to keep' -n "__fish_seen_subcommand_from prune"
  233. complete -c borg -f -s m -l 'keep-monthly' -d 'NUMBER of monthly archives to keep' -n "__fish_seen_subcommand_from prune"
  234. complete -c borg -f -l 'keep-13weekly' -d 'NUMBER of quarterly archives to keep (13 week strategy)' -n "__fish_seen_subcommand_from prune"
  235. complete -c borg -f -l 'keep-3monthly' -d 'NUMBER of quarterly archives to keep (3 month strategy)' -n "__fish_seen_subcommand_from prune"
  236. complete -c borg -f -s y -l 'keep-yearly' -d 'NUMBER of yearly archives to keep' -n "__fish_seen_subcommand_from prune"
  237. # Archive filters
  238. complete -c borg -f -s P -l 'prefix' -d 'Only archive names starting with PREFIX' -n "__fish_seen_subcommand_from prune"
  239. complete -c borg -f -s a -l 'match-archives' -d 'Only consider archives matching all patterns' -n "__fish_seen_subcommand_from prune"
  240. # borg compact options
  241. complete -c borg -f -s n -l 'dry-run' -d 'Do nothing' -n "__fish_seen_subcommand_from compact"
  242. complete -c borg -f -s s -l 'stats' -d 'Print statistics (might be much slower)' -n "__fish_seen_subcommand_from compact"
  243. # borg info options
  244. complete -c borg -f -l 'json' -d 'Format output in json format' -n "__fish_seen_subcommand_from info"
  245. # Archive filters
  246. complete -c borg -f -s P -l 'prefix' -d 'Only archive names starting with PREFIX' -n "__fish_seen_subcommand_from info"
  247. complete -c borg -f -s a -l 'match-archives' -d 'Only consider archives matching all patterns' -n "__fish_seen_subcommand_from info"
  248. set -l sort_keys "timestamp archive name id tags host user"
  249. complete -c borg -f -l 'sort-by' -d 'Sorting KEYS [timestamp]' -a "$sort_keys" -n "__fish_seen_subcommand_from info"
  250. complete -c borg -f -l 'first' -d 'Only first N archives' -n "__fish_seen_subcommand_from info"
  251. complete -c borg -f -l 'last' -d 'Only last N archives' -n "__fish_seen_subcommand_from info"
  252. complete -c borg -f -l 'oldest' -d 'Consider archives within TIMESPAN from oldest' -n "__fish_seen_subcommand_from info"
  253. complete -c borg -f -l 'newest' -d 'Consider archives within TIMESPAN from newest' -n "__fish_seen_subcommand_from info"
  254. complete -c borg -f -l 'older' -d 'Consider archives older than TIMESPAN' -n "__fish_seen_subcommand_from info"
  255. complete -c borg -f -l 'newer' -d 'Consider archives newer than TIMESPAN' -n "__fish_seen_subcommand_from info"
  256. # borg repo-list options
  257. complete -c borg -f -l 'short' -d 'Only print the archive IDs, nothing else' -n "__fish_seen_subcommand_from repo-list"
  258. complete -c borg -f -l 'format' -d 'Specify format for archive listing' -n "__fish_seen_subcommand_from repo-list"
  259. complete -c borg -f -l 'json' -d 'Format output as JSON' -n "__fish_seen_subcommand_from repo-list"
  260. # Archive filters
  261. complete -c borg -f -s P -l 'prefix' -d 'Only archive names starting with PREFIX' -n "__fish_seen_subcommand_from repo-list"
  262. complete -c borg -f -s a -l 'match-archives' -d 'Only consider archives matching all patterns' -n "__fish_seen_subcommand_from repo-list"
  263. set -l sort_keys "timestamp archive name id tags host user"
  264. complete -c borg -f -l 'sort-by' -d 'Sorting KEYS [timestamp]' -a "$sort_keys" -n "__fish_seen_subcommand_from repo-list"
  265. complete -c borg -f -l 'first' -d 'Only first N archives' -n "__fish_seen_subcommand_from repo-list"
  266. complete -c borg -f -l 'last' -d 'Only last N archives' -n "__fish_seen_subcommand_from repo-list"
  267. complete -c borg -f -l 'oldest' -d 'Consider archives within TIMESPAN from oldest' -n "__fish_seen_subcommand_from repo-list"
  268. complete -c borg -f -l 'newest' -d 'Consider archives within TIMESPAN from newest' -n "__fish_seen_subcommand_from repo-list"
  269. complete -c borg -f -l 'older' -d 'Consider archives older than TIMESPAN' -n "__fish_seen_subcommand_from repo-list"
  270. complete -c borg -f -l 'newer' -d 'Consider archives newer than TIMESPAN' -n "__fish_seen_subcommand_from repo-list"
  271. complete -c borg -f -l 'deleted' -d 'Consider only soft-deleted archives' -n "__fish_seen_subcommand_from repo-list"
  272. # borg mount options
  273. complete -c borg -f -s f -l 'foreground' -d 'Stay in foreground, do not daemonize' -n "__fish_seen_subcommand_from mount"
  274. # FIXME This list is probably not full, but I tried to pick only those that are relevant to borg mount -o:
  275. set -l fuse_options "ac_attr_timeout= allow_damaged_files allow_other allow_root attr_timeout= auto auto_cache auto_unmount default_permissions entry_timeout= gid= group_id= kernel_cache max_read= negative_timeout= noauto noforget remember= remount rootmode= uid= umask= user user_id= versions"
  276. complete -c borg -f -s o -d 'Fuse mount OPTION' -a "$fuse_options" -n "__fish_seen_subcommand_from mount"
  277. # Archive filters
  278. complete -c borg -f -s P -l 'prefix' -d 'Only archive names starting with PREFIX' -n "__fish_seen_subcommand_from mount"
  279. complete -c borg -f -s a -l 'match-archives' -d 'Only consider archives matching all patterns' -n "__fish_seen_subcommand_from mount"
  280. set -l sort_keys "timestamp archive name id tags host user"
  281. complete -c borg -f -l 'sort-by' -d 'Sorting KEYS [timestamp]' -a "$sort_keys" -n "__fish_seen_subcommand_from mount"
  282. complete -c borg -f -l 'first' -d 'Only first N archives' -n "__fish_seen_subcommand_from mount"
  283. complete -c borg -f -l 'last' -d 'Only last N archives' -n "__fish_seen_subcommand_from mount"
  284. complete -c borg -f -l 'oldest' -d 'Consider archives within TIMESPAN from oldest' -n "__fish_seen_subcommand_from mount"
  285. complete -c borg -f -l 'newest' -d 'Consider archives within TIMESPAN from newest' -n "__fish_seen_subcommand_from mount"
  286. complete -c borg -f -l 'older' -d 'Consider archives older than TIMESPAN' -n "__fish_seen_subcommand_from mount"
  287. complete -c borg -f -l 'newer' -d 'Consider archives newer than TIMESPAN' -n "__fish_seen_subcommand_from mount"
  288. # Exclusion options
  289. complete -c borg -s e -l 'exclude' -d 'Exclude paths matching PATTERN' -n "__fish_seen_subcommand_from mount"
  290. complete -c borg -l 'exclude-from' -d 'Read exclude patterns from EXCLUDEFILE' -n "__fish_seen_subcommand_from mount"
  291. complete -c borg -f -l 'pattern' -d 'Include/exclude paths matching PATTERN' -n "__fish_seen_subcommand_from mount"
  292. complete -c borg -l 'patterns-from' -d 'Include/exclude paths from PATTERNFILE' -n "__fish_seen_subcommand_from mount"
  293. complete -c borg -f -l 'strip-components' -d 'Remove NUMBER of leading path elements' -n "__fish_seen_subcommand_from mount"
  294. # borg umount
  295. # no specific options
  296. # borg tag options
  297. complete -c borg -f -l 'set' -d 'Set tags (can be given multiple times)' -n "__fish_seen_subcommand_from tag"
  298. complete -c borg -f -l 'add' -d 'Add tags (can be given multiple times)' -n "__fish_seen_subcommand_from tag"
  299. complete -c borg -f -l 'remove' -d 'Remove tags (can be given multiple times)' -n "__fish_seen_subcommand_from tag"
  300. # Archive filters
  301. complete -c borg -f -s a -l 'match-archives' -d 'Only consider archives matching all patterns' -n "__fish_seen_subcommand_from tag"
  302. set -l sort_keys "timestamp archive name id tags host user"
  303. complete -c borg -f -l 'sort-by' -d 'Sorting KEYS [timestamp]' -a "$sort_keys" -n "__fish_seen_subcommand_from tag"
  304. complete -c borg -f -l 'first' -d 'Only first N archives' -n "__fish_seen_subcommand_from tag"
  305. complete -c borg -f -l 'last' -d 'Only last N archives' -n "__fish_seen_subcommand_from tag"
  306. complete -c borg -f -l 'oldest' -d 'Consider archives within TIMESPAN from oldest' -n "__fish_seen_subcommand_from tag"
  307. complete -c borg -f -l 'newest' -d 'Consider archives within TIMESPAN from newest' -n "__fish_seen_subcommand_from tag"
  308. complete -c borg -f -l 'older' -d 'Consider archives older than TIMESPAN' -n "__fish_seen_subcommand_from tag"
  309. complete -c borg -f -l 'newer' -d 'Consider archives newer than TIMESPAN' -n "__fish_seen_subcommand_from tag"
  310. # borg key change-passphrase
  311. # no specific options
  312. # borg key export
  313. complete -c borg -f -l 'paper' -d 'Create an export for printing' -n "__fish_seen_subcommand_from export"
  314. complete -c borg -f -l 'qr-html' -d 'Create an html file for printing and qr' -n "__fish_seen_subcommand_from export"
  315. # borg transfer options
  316. complete -c borg -f -s n -l 'dry-run' -d 'Do not change repository, just check' -n "__fish_seen_subcommand_from transfer"
  317. complete -c borg -f -l 'other-repo' -d 'Transfer archives from the other repository' -n "__fish_seen_subcommand_from transfer"
  318. complete -c borg -f -l 'from-borg1' -d 'Other repository is borg 1.x' -n "__fish_seen_subcommand_from transfer"
  319. complete -c borg -f -l 'upgrader' -d 'Use the upgrader to convert transferred data' -n "__fish_seen_subcommand_from transfer"
  320. complete -c borg -f -s C -l 'compression' -d 'Select compression algorithm' -a "$compression_methods" -n "__fish_seen_subcommand_from transfer"
  321. complete -c borg -f -l 'recompress' -d 'Recompress chunks CONDITION' -a "$recompress_when" -n "__fish_seen_subcommand_from transfer"
  322. complete -c borg -f -l 'chunker-params' -d 'Chunker PARAMETERS [19,23,21,4095]' -n "__fish_seen_subcommand_from transfer"
  323. # Archive filters
  324. complete -c borg -f -s a -l 'match-archives' -d 'Only consider archives matching all patterns' -n "__fish_seen_subcommand_from transfer"
  325. set -l sort_keys "timestamp archive name id tags host user"
  326. complete -c borg -f -l 'sort-by' -d 'Sorting KEYS [timestamp]' -a "$sort_keys" -n "__fish_seen_subcommand_from transfer"
  327. complete -c borg -f -l 'first' -d 'Only first N archives' -n "__fish_seen_subcommand_from transfer"
  328. complete -c borg -f -l 'last' -d 'Only last N archives' -n "__fish_seen_subcommand_from transfer"
  329. complete -c borg -f -l 'oldest' -d 'Consider archives within TIMESPAN from oldest' -n "__fish_seen_subcommand_from transfer"
  330. complete -c borg -f -l 'newest' -d 'Consider archives within TIMESPAN from newest' -n "__fish_seen_subcommand_from transfer"
  331. complete -c borg -f -l 'older' -d 'Consider archives older than TIMESPAN' -n "__fish_seen_subcommand_from transfer"
  332. complete -c borg -f -l 'newer' -d 'Consider archives newer than TIMESPAN' -n "__fish_seen_subcommand_from transfer"
  333. # borg key import
  334. complete -c borg -f -l 'paper' -d 'Import from a backup done with --paper' -n "__fish_seen_subcommand_from import"
  335. # borg undelete options
  336. complete -c borg -f -s n -l 'dry-run' -d 'Do not change repository' -n "__fish_seen_subcommand_from undelete"
  337. complete -c borg -f -l 'list' -d 'Output verbose list of archives' -n "__fish_seen_subcommand_from undelete"
  338. # Archive filters
  339. complete -c borg -f -s a -l 'match-archives' -d 'Only consider archives matching all patterns' -n "__fish_seen_subcommand_from undelete"
  340. set -l sort_keys "timestamp archive name id tags host user"
  341. complete -c borg -f -l 'sort-by' -d 'Sorting KEYS [timestamp]' -a "$sort_keys" -n "__fish_seen_subcommand_from undelete"
  342. complete -c borg -f -l 'first' -d 'Only first N archives' -n "__fish_seen_subcommand_from undelete"
  343. complete -c borg -f -l 'last' -d 'Only last N archives' -n "__fish_seen_subcommand_from undelete"
  344. complete -c borg -f -l 'oldest' -d 'Consider archives within TIMESPAN from oldest' -n "__fish_seen_subcommand_from undelete"
  345. complete -c borg -f -l 'newest' -d 'Consider archives within TIMESPAN from newest' -n "__fish_seen_subcommand_from undelete"
  346. complete -c borg -f -l 'older' -d 'Consider archives older than TIMESPAN' -n "__fish_seen_subcommand_from undelete"
  347. complete -c borg -f -l 'newer' -d 'Consider archives newer than TIMESPAN' -n "__fish_seen_subcommand_from undelete"
  348. # borg recreate
  349. complete -c borg -f -l 'list' -d 'Print verbose list of items' -n "__fish_seen_subcommand_from recreate"
  350. complete -c borg -f -l 'filter' -d 'Only items with given STATUSCHARS' -n "__fish_seen_subcommand_from recreate"
  351. complete -c borg -f -s n -l 'dry-run' -d 'Do not change the repository' -n "__fish_seen_subcommand_from recreate"
  352. complete -c borg -f -s s -l 'stats' -d 'Print verbose statistics' -n "__fish_seen_subcommand_from recreate"
  353. # Exclusion options
  354. complete -c borg -s e -l 'exclude' -d 'Exclude paths matching PATTERN' -n "__fish_seen_subcommand_from recreate"
  355. complete -c borg -l 'exclude-from' -d 'Read exclude patterns from EXCLUDEFILE' -n "__fish_seen_subcommand_from recreate"
  356. complete -c borg -f -l 'pattern' -d 'Include/exclude paths matching PATTERN' -n "__fish_seen_subcommand_from recreate"
  357. complete -c borg -l 'patterns-from' -d 'Include/exclude paths from PATTERNFILE' -n "__fish_seen_subcommand_from recreate"
  358. complete -c borg -f -l 'exclude-caches' -d 'Exclude directories tagged as cache' -n "__fish_seen_subcommand_from recreate"
  359. complete -c borg -l 'exclude-if-present' -d 'Exclude directories that contain FILENAME' -n "__fish_seen_subcommand_from recreate"
  360. complete -c borg -f -l 'keep-exclude-tags' -d 'Keep tag files of excluded directories' -n "__fish_seen_subcommand_from recreate"
  361. # Archive filters
  362. complete -c borg -f -s a -l 'match-archives' -d 'Only consider archives matching all patterns' -n "__fish_seen_subcommand_from recreate"
  363. set -l sort_keys "timestamp archive name id tags host user"
  364. complete -c borg -f -l 'sort-by' -d 'Sorting KEYS [timestamp]' -a "$sort_keys" -n "__fish_seen_subcommand_from recreate"
  365. complete -c borg -f -l 'first' -d 'Only first N archives' -n "__fish_seen_subcommand_from recreate"
  366. complete -c borg -f -l 'last' -d 'Only last N archives' -n "__fish_seen_subcommand_from recreate"
  367. complete -c borg -f -l 'oldest' -d 'Consider archives within TIMESPAN from oldest' -n "__fish_seen_subcommand_from recreate"
  368. complete -c borg -f -l 'newest' -d 'Consider archives within TIMESPAN from newest' -n "__fish_seen_subcommand_from recreate"
  369. complete -c borg -f -l 'older' -d 'Consider archives older than TIMESPAN' -n "__fish_seen_subcommand_from recreate"
  370. complete -c borg -f -l 'newer' -d 'Consider archives newer than TIMESPAN' -n "__fish_seen_subcommand_from recreate"
  371. # Archive options
  372. complete -c borg -f -l 'target' -d "Create a new ARCHIVE" -n "__fish_seen_subcommand_from recreate"
  373. complete -c borg -f -l 'comment' -d 'Add COMMENT to the archive' -n "__fish_seen_subcommand_from recreate"
  374. complete -c borg -f -l 'timestamp' -d 'Set creation TIME (yyyy-mm-ddThh:mm:ss)' -n "__fish_seen_subcommand_from recreate"
  375. complete -c borg -l 'timestamp' -d 'Set creation time using reference FILE' -n "__fish_seen_subcommand_from recreate"
  376. complete -c borg -f -s C -l 'compression' -d 'Select compression ALGORITHM,LEVEL [lz4]' -a "$compression_methods" -n "__fish_seen_subcommand_from recreate"
  377. set -l recompress_when "if-different always never"
  378. complete -c borg -f -l 'recompress' -d 'Recompress chunks CONDITION' -a "$recompress_when" -n "__fish_seen_subcommand_from recreate"
  379. complete -c borg -f -l 'chunker-params' -d 'Chunker PARAMETERS [19,23,21,4095]' -n "__fish_seen_subcommand_from recreate"
  380. # borg export-tar options
  381. complete -c borg -l 'tar-filter' -d 'Filter program to pipe data through' -n "__fish_seen_subcommand_from export-tar"
  382. complete -c borg -f -l 'list' -d 'Print verbose list of items' -n "__fish_seen_subcommand_from export-tar"
  383. complete -c borg -f -l 'tar-format' -d 'Select tar format: BORG, PAX or GNU' -n "__fish_seen_subcommand_from export-tar"
  384. # Exclusion options
  385. complete -c borg -s e -l 'exclude' -d 'Exclude paths matching PATTERN' -n "__fish_seen_subcommand_from export-tar"
  386. complete -c borg -l 'exclude-from' -d 'Read exclude patterns from EXCLUDEFILE' -n "__fish_seen_subcommand_from export-tar"
  387. complete -c borg -f -l 'pattern' -d 'Include/exclude paths matching PATTERN' -n "__fish_seen_subcommand_from export-tar"
  388. complete -c borg -l 'patterns-from' -d 'Include/exclude paths from PATTERNFILE' -n "__fish_seen_subcommand_from export-tar"
  389. complete -c borg -f -l 'strip-components' -d 'Remove NUMBER of leading path elements' -n "__fish_seen_subcommand_from export-tar"
  390. # borg import-tar options
  391. complete -c borg -l 'tar-filter' -d 'Filter program to pipe data through' -n "__fish_seen_subcommand_from import-tar"
  392. complete -c borg -f -s s -l 'stats' -d 'Print statistics for the created archive' -n "__fish_seen_subcommand_from import-tar"
  393. complete -c borg -f -l 'list' -d 'Print verbose list of items' -n "__fish_seen_subcommand_from import-tar"
  394. complete -c borg -f -l 'filter' -d 'Only display items with given STATUSCHARS' -n "__fish_seen_subcommand_from import-tar"
  395. complete -c borg -f -l 'json' -d 'Output stats as JSON' -n "__fish_seen_subcommand_from import-tar"
  396. complete -c borg -f -l 'ignore-zeros' -d 'Ignore zero-filled blocks in the input' -n "__fish_seen_subcommand_from import-tar"
  397. complete -c borg -f -l 'comment' -d 'Add COMMENT to the archive' -n "__fish_seen_subcommand_from import-tar"
  398. complete -c borg -f -l 'timestamp' -d 'Set creation TIME (yyyy-mm-ddThh:mm:ss)' -n "__fish_seen_subcommand_from import-tar"
  399. complete -c borg -f -l 'chunker-params' -d 'Chunker PARAMETERS [19,23,21,4095]' -n "__fish_seen_subcommand_from import-tar"
  400. complete -c borg -f -s C -l 'compression' -d 'Select compression ALGORITHM,LEVEL [lz4]' -a "$compression_methods" -n "__fish_seen_subcommand_from import-tar"
  401. # Exclusion options
  402. complete -c borg -s e -l 'exclude' -d 'Exclude paths matching PATTERN' -n "__fish_seen_subcommand_from recreate"
  403. complete -c borg -l 'exclude-from' -d 'Read exclude patterns from EXCLUDEFILE' -n "__fish_seen_subcommand_from recreate"
  404. complete -c borg -f -l 'pattern' -d 'Include/exclude paths matching PATTERN' -n "__fish_seen_subcommand_from recreate"
  405. complete -c borg -l 'patterns-from' -d 'Include/exclude paths from PATTERNFILE' -n "__fish_seen_subcommand_from recreate"
  406. complete -c borg -f -l 'strip-components' -d 'Remove NUMBER of leading path elements' -n "__fish_seen_subcommand_from recreate"
  407. # borg serve
  408. complete -c borg -l 'restrict-to-path' -d 'Restrict repository access to PATH' -n "__fish_seen_subcommand_from serve"
  409. complete -c borg -l 'restrict-to-repository' -d 'Restrict repository access at PATH' -n "__fish_seen_subcommand_from serve"
  410. # borg with-lock
  411. # no specific options
  412. # borg break-lock
  413. # no specific options
  414. # borg benchmark
  415. # no specific options
  416. # borg help
  417. # no specific options
  418. # List repositories::archives
  419. function __fish_borg_is_argument_n --description 'Test if current argument is on Nth place' --argument n
  420. set tokens (commandline --current-process --tokenize --cut-at-cursor)
  421. set -l tokencount 0
  422. for token in $tokens
  423. switch $token
  424. case '-*'
  425. # ignore command line switches
  426. case '*'
  427. set tokencount (math $tokencount+1)
  428. end
  429. end
  430. return (test $tokencount -eq $n)
  431. end
  432. function __fish_borg_is_dir_a_repository
  433. set -l config_content
  434. if test -f $argv[1]/README
  435. and test -f $argv[1]/config
  436. read config_content < $argv[1]/config 2>/dev/null
  437. end
  438. return (string match --quiet '[repository]' $config_content)
  439. end
  440. function __fish_borg_list_repos_or_archives
  441. if string match --quiet --regex '.*::' '"'(commandline --current-token)'"'
  442. # If the current token contains "::" then list the archives:
  443. set -l repository_name (string replace --regex '::.*' '' (commandline --current-token))
  444. borg list --format="$repository_name::{archive}{TAB}{comment}{NEWLINE}" "$repository_name" 2>/dev/null
  445. else
  446. # Otherwise list the repositories, directories and user@host entries:
  447. set -l directories (commandline --cut-at-cursor --current-token)*/
  448. for directoryname in $directories
  449. if __fish_borg_is_dir_a_repository $directoryname
  450. printf '%s::\t%s\n' (string trim --right --chars='/' $directoryname) "Repository"
  451. else
  452. printf '%s\n' $directoryname
  453. end
  454. end
  455. __fish_complete_user_at_hosts | string replace --regex '$' ':'
  456. end
  457. end
  458. complete -c borg -f -n "__fish_borg_is_argument_n 2" -a '(__fish_borg_list_repos_or_archives)'
  459. # Additional archive listings
  460. function __fish_borg_is_diff_second_archive
  461. return (string match --quiet --regex ' diff .*::[^ ]+ '(commandline --current-token)'$' (commandline))
  462. end
  463. function __fish_borg_is_delete_additional_archive
  464. return (string match --quiet --regex ' delete .*::[^ ]+ ' (commandline))
  465. end
  466. function __fish_borg_list_only_archives
  467. set -l repo_matches (string match --regex '([^ ]*)::' (commandline))
  468. borg list --format="{archive}{TAB}{comment}{NEWLINE}" "$repo_matches[2]" 2>/dev/null
  469. end
  470. complete -c borg -f -n __fish_borg_is_diff_second_archive -a '(__fish_borg_list_only_archives)'
  471. complete -c borg -f -n __fish_borg_is_delete_additional_archive -a '(__fish_borg_list_only_archives)'