-
Notifications
You must be signed in to change notification settings - Fork 3
/
_mongo
56 lines (54 loc) · 3.64 KB
/
_mongo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#compdef mongo
_arguments -S \
"--shell[Run the shell after executing files]" \
"--nodb[Don't connect to mongod on startup - no 'db address' arg expected]" \
'--norc[Will not run the ".mongorc.js" file on start up]' \
"--quiet[Be less chatty]" \
"--port[Port to connect to]:arg:(27017)" \
"--host[Server to connect to]:arg:(localhost)" \
"--ipv6[Enable IPv6 support (disabled by default)]" \
"--eval[Evaluate javascript]:filename:{_files -g '*.js'}" \
{-h,--help}"[Show this usage information]" \
"--version[Show version information]" \
"--verbose[Increase verbosity]" \
"--disableImplicitSessions[Do not automatically create and use implicit sessions]" \
"--disableJavaScriptJIT[Disable the JavaScript just in time compiler (MongoDB 3.2+)]" \
"--disableJavaScriptProtection[Allow automatic JavaScript function marshalling (MongoDB 3.4+)]" \
"--enableJavaScriptProtection[Disallow automatic JavaScript function marshalling (MongoDB 3.2.4+; not required in 3.4)]" \
"--jsHeapLimitMB[Set the JavaScript scope's heap size limit]:arg:" \
"--idleSessionTimeout[Terminate the Shell session if it's been idle for this many seconds]:arg:" \
"--awsAccessKeyId[AWS Access Key for FLE Amazon KMS]:arg:" \
"--awsSecretAccessKey[AWS Secret Key for FLE Amazon KMS]:arg:" \
"--awsSessionToken[Optional AWS Session Token ID]:arg:" \
"--keyVaultNamespace[database.collection to store encrypted FLE parameters]:arg:" \
"--kmsURL[Test parameter to override the URL for KMS]:arg:" \
"--awsIamSessionToken[AWS Session Token for temporary credentials]:arg:" \
"--ssl[Use SSL for all connections]" \
"--sslCAFile[Certificate authority file for SSL]:filename:_files" \
"--sslPEMKeyFile[PEM certificate/key file for SSl]:filename:_files" \
"--sslPEMKeyPassword[Password for key in PEM file for SSL]:arg:" \
"--sslCRLFile[Certificate revocation list file for SSL]:filename:_files" \
"--sslAllowInvalidHostnames[Allow connections to servers with non-matching hostnames]" \
"--sslAllowInvalidCertificates[Allow connections to servers with invalid certificates]" \
"--sslCertificateSelector[SSL Certificate in system store (MongoDB 4.0+)]:arg:" \
"--sslDisabledProtocols[Comma separated list of TLS protocols to disable]:arg:(TLS1_0,TLS1_1,TLS1_2)" \
"--sslFIPSMode[Activate FIPS 140-2 mode at startup]" \
"--tls[Use TLS for all connections]" \
"--tlsCertificateKeyFile[PEM certificate/key file for TLS]:filename:_files" \
"--tlsCertificateKeyFilePassword[Password for key in PEM file for TLS]:arg:" \
"--tlsCAFile[Certificate Authority file for TLS]:filename:_files" \
"--tlsCRLFile[Certificate Revocation List file for TLS]:filename:_files" \
"--tlsAllowInvalidHostnames[Allow server certificates to provide non-matching hostnames]" \
"--tlsAllowInvalidCertificates[Allow connections to servers with invalid certificates]" \
"--tlsFIPSMode[Activate FIPS 140-2 mode at startup]" \
"--tlsCertificateSelector[TLS Certificate in system store]:arg:" \
"--tlsDisabledProtocols[Comma separated list of TLS protocols to disable \[TLS1_0,TLS1_1,TLS1_2\]]:arg:(TLS1_0,TLS1_1,TLS1_2)" \
{-u,--username}"[Username for authentication]:arg:" \
{-p,--password}"[Password for authentication]:arg:" \
"--retryWrites[automatically retry write operations upon transient network errors (MongoDB 3.6+)]" \
"--authenticationDatabase[User source (defaults to dbname)]:arg:(admin)" \
"--authenticationMechanism[Authentication mechanism]:arg:(SCRAM-SHA-256)" \
"--gssapiServiceName[Service name to use when authenticating using GSSAPI/Kerberos]:arg:" \
"--gssapiHostName[Remote host name to use for purpose of GSSAPI/Kerberos authentication]:arg:" \
&& return 0
return 1