kbsecret 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +16 -1
- data/bin/kbsecret +16 -5
- data/lib/kbsecret.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbc13cb4e4be9699119df9e1a40229636c033c24
|
4
|
+
data.tar.gz: bfd30dd12815a1ef6b5e7ad7ced9b0a94e9523da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75b37e82e7b7f798a149b458d94575bce3c2708dcede2ede334d75d11fe251a517ab35a619f352a0bb3c1b0b81265e7319e8e7a6739beb21253bf42accbb5066
|
7
|
+
data.tar.gz: 87526553d6e2b39798df1923e775c54d6e7860610bd342153f9dab3b8eabbdd38194fe91cb1bbc880dad65160d037ed09a11223a985b8d12131ef7865460168c
|
data/README.md
CHANGED
@@ -71,6 +71,21 @@ $ kbsecret env -s dev-team --all
|
|
71
71
|
export API_KEY='0xBADBEEF'
|
72
72
|
```
|
73
73
|
|
74
|
+
### Shell Completion
|
75
|
+
|
76
|
+
kbsecret provides shell completion functions for bash.
|
77
|
+
|
78
|
+
To generate them:
|
79
|
+
|
80
|
+
```bash
|
81
|
+
$ make bash
|
82
|
+
$ # or, if you have additional commands that support --introspect-flags:
|
83
|
+
$ CMDS='foo bar baz' make bash
|
84
|
+
$ cp completions/kbsecret.bash ${YOUR_COMPLETION_DIR}
|
85
|
+
```
|
86
|
+
|
87
|
+
Please feel free to contribute completion scripts for other shells!
|
88
|
+
|
74
89
|
### TODO
|
75
90
|
|
76
|
-
*
|
91
|
+
* zsh/fish completions
|
data/bin/kbsecret
CHANGED
@@ -6,6 +6,7 @@ BUILTIN_CMDS = [
|
|
6
6
|
"help",
|
7
7
|
"version",
|
8
8
|
"commands",
|
9
|
+
"types",
|
9
10
|
].freeze
|
10
11
|
|
11
12
|
EXT_PATHS = ENV["PATH"].split(File::PATH_SEPARATOR).map do |path|
|
@@ -19,11 +20,6 @@ end.freeze
|
|
19
20
|
ALIASES = Hash.new { |_, k| k }.update({
|
20
21
|
"--help" => "help",
|
21
22
|
"-h" => "help",
|
22
|
-
"l" => "login",
|
23
|
-
"pw" => "login",
|
24
|
-
"ls" => "list",
|
25
|
-
"del" => "rm",
|
26
|
-
"create" => "new",
|
27
23
|
}).freeze
|
28
24
|
|
29
25
|
ALL_CMDS = (ALIASES.keys + BUILTIN_CMDS + EXT_CMDS).freeze
|
@@ -66,6 +62,8 @@ def help(*args)
|
|
66
62
|
if builtin? command
|
67
63
|
send "#{command}_help"
|
68
64
|
else
|
65
|
+
# XXX: this probably doesn't make sense, since not every user command
|
66
|
+
# will implement --help.
|
69
67
|
system expand(command), "--help"
|
70
68
|
end
|
71
69
|
end
|
@@ -112,6 +110,19 @@ def commands_help
|
|
112
110
|
EOS
|
113
111
|
end
|
114
112
|
|
113
|
+
def types
|
114
|
+
puts KBSecret::Record.record_types.join("\n")
|
115
|
+
end
|
116
|
+
|
117
|
+
def types_help
|
118
|
+
puts <<~EOS
|
119
|
+
Prints a list of all available kbsecret record types.
|
120
|
+
|
121
|
+
Usage:
|
122
|
+
kbsecret types
|
123
|
+
EOS
|
124
|
+
end
|
125
|
+
|
115
126
|
command = normalize(ARGV.shift || "help")
|
116
127
|
|
117
128
|
if builtin? command
|
data/lib/kbsecret.rb
CHANGED
@@ -8,7 +8,7 @@ require_relative "kbsecret/session"
|
|
8
8
|
# The primary namespace for kbsecret.
|
9
9
|
module KBSecret
|
10
10
|
# kbsecret's current version
|
11
|
-
VERSION = "0.0.
|
11
|
+
VERSION = "0.0.10".freeze
|
12
12
|
|
13
13
|
# fail very early if the user doesn't have keybase and KBFS running
|
14
14
|
raise Keybase::KeybaseNotRunningError unless Keybase.running?
|