234ad7398d5e241ad625d3c0b1666ff8c22c4596

Author
Angel Ramboi <angel@ramboi.com>
Committer
GitHub <noreply@github.com>
Date

Message

chore(ipfs): update completion script for IPFS version 0.8.0 (#9800)

Diff

This diff is truncated to protect this page.

  1diff --git a/plugins/ipfs/_ipfs b/plugins/ipfs/_ipfs
  2index 90c0a61c87ad7bc5211738bfd505c1d34cc94c38..8771bc4ba9b8e5fafaf71de702fc4e145807b36d 100644
  3--- a/plugins/ipfs/_ipfs
  4+++ b/plugins/ipfs/_ipfs
  5@@ -93,7 +93,8 @@ _ipfs_subcommand(){
  6             (pin)
  7               _arguments \
  8                 '(-t --type)'{-t,--type}'[The type of pinned keys to list. Can be "direct", "indirect", "recursive", or "all". Default: all.]' \
  9-                '(-q --quiet)'{-q,--quiet}'[Write just hashes of objects.]'
 10+                '(-q --quiet)'{-q,--quiet}'[Write just hashes of objects.]' \
 11+                '(-s --stream)'{-s,--stream}'[Enable streaming of pins as they are discovered.]'
 12             ;;
 13             (p2p)
 14               _arguments '(-v --headers)'{-v,--headers}'[Print table headers (Protocol, Listen, Target).]'
 15@@ -116,7 +117,14 @@ _ipfs_subcommand(){
 16             ;;
 17           esac
 18         ;;
 19-        (get|query|findpeer)
 20+        (query|findpeer)
 21+          case $MAIN_SUBCOMMAND in
 22+            (dht)
 23+              _arguments '(-v --verbose)'{-v,--verbose}'[Print extra information.]'
 24+            ;;
 25+          esac
 26+        ;;
 27+        (get)
 28           case $MAIN_SUBCOMMAND in
 29             (dht)
 30               _arguments '(-v --verbose)'{-v,--verbose}'[Print extra information.]'
 31@@ -158,22 +166,33 @@ _ipfs_subcommand(){
 32             ;;
 33           esac
 34         ;;
 35-        (cmds|diff)
 36+        (cmds)
 37           case $MAIN_SUBCOMMAND in
 38-            (diag|object)
 39+            (diag)
 40+              _arguments '(-v --verbose)'{-v,--verbose}'[Print extra information.]'
 41+            ;;
 42+          esac
 43+        ;;
 44+        (diff)
 45+          case $MAIN_SUBCOMMAND in
 46+            (object)
 47               _arguments '(-v --verbose)'{-v,--verbose}'[Print extra information.]'
 48             ;;
 49           esac
 50         ;;
 51         (stat)
 52           case $MAIN_SUBCOMMAND in
 53+            (dag)
 54+              _arguments \
 55+                '(-p --progress)'{-p,--progress}'[Return progressive data while reading through the DAG. Default: true.]'
 56+            ;;
 57             (object)
 58               _arguments '--human[Print sizes in human readable format (e.g., 1K 234M 2G).]'
 59             ;;
 60             (repo)
 61               _arguments \
 62-                '--size-only[Only report RepoSize and StorageMax.]' \
 63-                '--human[Print sizes in human readable format (e.g., 1K 234M 2G).]'
 64+                '(-s --size-only)'{-s,--size-only}'[Only report RepoSize and StorageMax.]' \
 65+                '(-H --human)'{-H,--human}'[Print sizes in human readable format (e.g., 1K 234M 2G).]'
 66             ;;
 67           esac
 68         ;;
 69@@ -186,7 +205,8 @@ _ipfs_subcommand(){
 70                 '--allow-offline[When offline, save the IPNS record to the the local datastore without broadcasting to the network instead of simply failing.]' \
 71                 '--ttl[Time duration this record should be cached for. Uses the same syntax as the lifetime option. (caution: experimental).]' \
 72                 '(-k --key)'{-k,--key}"[Name of the key to be used or a valid PeerID, as listed by 'ipfs key list -l'. Default: self.]" \
 73-                '(-Q --quieter)'{-Q,--quieter}'[Write only final hash.]'
 74+                '(-Q --quieter)'{-Q,--quieter}'[Write only final hash.]' \
 75+                '--ipns-base[Encoding used for keys: Can either be a multibase encoded CID or a base58btc encoded multihash. Takes {b58mh|base36|k|base32|b...}. Default: base36.]'
 76             ;;
 77           esac
 78         ;;
 79@@ -254,7 +274,7 @@ _ipfs_subcommand(){
 80                 '(-p --peer)'{-p,--peer}'[Specify a peer to print bandwidth for.]' \
 81                 '(-t --proto)'{-t,--proto}'[Specify a protocol to print bandwidth for.]' \
 82                 '--poll[Print bandwidth at an interval.]' \
 83-                '(-i --interval)'{-i,--interval}'[Time interval to wait between updating output, if 'poll' is true.]'
 84+                '(-i --interval)'{-i,--interval}"[Time interval to wait between updating output, if 'poll' is true.]"
 85             ;;
 86           esac
 87         ;;
 88@@ -289,6 +309,7 @@ _ipfs_subcommand(){
 89               _arguments \
 90                 '-f[Printf style format string. Default: %s.]' \
 91                 '-v[CID version to convert to.]' \
 92+                '--codec[CID codec to convert to.]' \
 93                 '-b[Multibase to display CID in.]'
 94             ;;
 95           esac
 96@@ -367,6 +388,45 @@ _ipfs_subcommand(){
 97             ;;
 98           esac
 99         ;;
100+        (export)
101+          case $MAIN_SUBCOMMAND in
102+            (dag)
103+              _arguments \
104+                '(-p --progress)'{-p,--progress}'[Display progress on CLI. Defaults to true when STDERR is a TTY.]'