cani 0.2.1 → 0.2.2
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 +5 -0
- data/lib/cani/api.rb +1 -1
- data/lib/cani/fzf.rb +5 -5
- data/lib/cani/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7cd61890b987c88ef41a0dcf5e30ee5fb22dafd234e5855fadc3e3319753e0ba
|
|
4
|
+
data.tar.gz: c40c2b1cd8ebe4e6bf6ec16ee5cce0863b903711d21b518ac8e45c562b166a99
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4e16c24b8230c0d6515be703fa6ab9f1f0cf5a0672b4896e711c4ba230569c5c373cf27b4930559a4a57ff912010bdb131d2fffa675407304359ee32da4922a2
|
|
7
|
+
data.tar.gz: c252dc1cdb93ed2a18e229b55bec0b4f92429922326ce764f4f34b32909af4ba867a9eb4cd8df77429e23a840350d06977f36667695438e1502a024d8346ea31
|
data/README.md
CHANGED
|
@@ -24,6 +24,11 @@ Or install it yourself as:
|
|
|
24
24
|
|
|
25
25
|
$ gem install cani
|
|
26
26
|
|
|
27
|
+
**dependencies**
|
|
28
|
+
|
|
29
|
+
Cani depends on [fzf](https://github.com/junegunn/fzf) to display most menu's.
|
|
30
|
+
<!-- Fzf is not a requirement when piping the output to another command -->
|
|
31
|
+
|
|
27
32
|
## Configuration
|
|
28
33
|
|
|
29
34
|
After installation, running the command (`cani`) for the first time will create some files and directories:
|
data/lib/cani/api.rb
CHANGED
data/lib/cani/fzf.rb
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
module Cani
|
|
2
2
|
module Fzf
|
|
3
3
|
def self.pick(rows, **opts)
|
|
4
|
-
unless executable?
|
|
5
|
-
puts 'fatal: command "fzf" not found, is it installed?'
|
|
6
|
-
exit 1
|
|
7
|
-
end
|
|
8
|
-
|
|
9
4
|
if STDOUT.tty?
|
|
5
|
+
unless executable?
|
|
6
|
+
puts 'Cani fatal: command "fzf" not found, is it installed?'
|
|
7
|
+
exit 1
|
|
8
|
+
end
|
|
9
|
+
|
|
10
10
|
rows = tableize_rows(rows, **opts).join "\n"
|
|
11
11
|
ohdr = opts.fetch :header, []
|
|
12
12
|
header = ohdr.is_a?(Array) ? [:cani, *ohdr].map { |v| v.to_s.downcase }.join(':')
|
data/lib/cani/version.rb
CHANGED