salt-key.fish 3.8 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # salt-key completion for fish shell
  2. # See salt_common.fish in the same folder for the information
  3. # hack to load functions from salt_common completion
  4. complete --do-complete='salt_common --' >/dev/null
  5. # salt-key general options (from --help)
  6. complete -c salt-key -f -s A -l accept-all -d "Accept all pending keys"
  7. complete -c salt-key -f -s a -l accept -d "Accept the specified public key (use --include-all to match rejected keys in addition to pending keys). Globs are supported."
  8. complete -c salt-key -f -l auto-create -d "Auto-create a signing key-pair if it does not yet exist"
  9. complete -c salt-key -f -s D -l delete-all -d "Delete all keys"
  10. complete -c salt-key -f -s d -l delete -d "Delete the specified key. Globs are supported."
  11. complete -c salt-key -f -s F -l finger-all -d "Print all keys' fingerprints"
  12. complete -c salt-key -f -s f -l finger -d "Print the specified key's fingerprint"
  13. complete -c salt-key -r -l gen-keys-dir -d "Set the directory to save the generated keypair, only works with \"gen_keys_dir\" option; default=."
  14. complete -c salt-key -f -l gen-keys -d "Set a name to generate a keypair for use with salt"
  15. complete -c salt-key -f -l gen-signature -d "Create a signature file of the masters public-key named master_pubkey_signature. The signature can be send to a minion in the masters auth-reply and enables the minion to verify the masters public-key cryptographically. This requires a new signing-key- pair which can be auto-created with the --auto-create parameter"
  16. complete -c salt-key -f -l include-all -d "Include non-pending keys when accepting/rejecting"
  17. complete -c salt-key -x -l keysize -d "Set the keysize for the generated key, only works with the \"--gen-keys\" option, the key size must be 2048 or higher, otherwise it will be rounded up to 2048; ; default=2048"
  18. complete -c salt-key -f -s L -l list-all -d "List all public keys. (Deprecated: use \"--list all\")"
  19. complete -c salt-key -x -s l -l list -d "List the public keys" -a "pre un unaccepted acc accepted rej rejected all"
  20. complete -c salt-key -f -s P -l print-all -d "Print all public keys"
  21. complete -c salt-key -f -s p -l print -d "Print the specified public key"
  22. complete -c salt-key -r -l priv -d "The private-key file to create a signature with"
  23. complete -c salt-key -r -l pub -d "The public-key file to create a signature for"
  24. complete -c salt-key -f -s R -l reject-all -d "Reject all pending keys"
  25. complete -c salt-key -f -s r -l reject -d "Reject the specified public key (use --include-all to match accepted keys in addition to pending keys). Globs are supported."
  26. complete -c salt-key -r -l signature-path -d "The path where the signature file should be written"
  27. # minions
  28. complete -c salt-key -f -n '__fish_contains_opt -s a accept; and not __fish_salt_extract_minion' -a '(__fish_salt_list_minion unaccepted) (__fish_salt_list_minion rejected)'
  29. complete -c salt-key -f -n '__fish_contains_opt -s d delete; and not __fish_salt_extract_minion' -a '(__fish_salt_list_minion all)'
  30. complete -c salt-key -f -n '__fish_contains_opt -s f finger; and not __fish_salt_extract_minion' -a '(__fish_salt_list_minion all)'
  31. complete -c salt-key -f -n '__fish_contains_opt -s p print; and not __fish_salt_extract_minion' -a '(__fish_salt_list_minion all)'
  32. complete -c salt-key -f -n '__fish_contains_opt -s r reject; and not __fish_salt_extract_minion' -a '(__fish_salt_list_minion unaccepted) (__fish_salt_list_minion accepted)'