cani 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bbc79d5e5ddb3a2d40c39165c898d32ffa657a68dec23636f1b2b15da5bb9857
4
- data.tar.gz: b93cf69ff6740b4fbd11010d5d3c05c196eb2e63edcdc5efbe09dba51279ba12
3
+ metadata.gz: b538dbb1b65e4769e5e2fb02fd718a4a75712010e43bdf01850d78e3eccc347d
4
+ data.tar.gz: c34ea1218fab4cbd225295c3ee4db35acef20a2b196b38133e6c3a15f36edbc1
5
5
  SHA512:
6
- metadata.gz: 688f7a52ab214dfeb46e46a1b93c8ab16e9ecc2fecd8d7e2a2de2c57b4cb0588e088bb24e313e8f9bb08e0e218842ea3b16439983357ad51dca35a778bacf706
7
- data.tar.gz: eae2981b38417c952878e3dd9fd7309881f07fe39bf726bd7986a74bb5d7a9f053f4453d4e909e12927b8d5d46104570ba0a450781ebff66932ee390ff279990
6
+ metadata.gz: 113d2b56f5238eb0dda7f33d38b800728d8164eaa57df9083459ab2bd137c100202acb796b33b9ea3e0ebf8c605e9f602a1236d89a32e23f73c3faea9713a4f9
7
+ data.tar.gz: 77372ff88b210477a125c58244b6ca884f537d5ca9c5a8ab1fee9b999705fdc790a1c6053c2739dd84331522ab8b5042f405d40eeb9db353611dd212c9541b60
data/README.md CHANGED
@@ -72,6 +72,8 @@ cani show
72
72
 
73
73
  Show a list of browsers. Selecting a browser will take you to the versions for that browser.
74
74
  Selecting a version shows the final window with feature support for that specific browser version.
75
+ Navigating to the previous window is possible by pressing <kbd>escape</kbd>, this will move you up one level.
76
+ When <kbd>escape</kbd> is pressed at the browser selection menu, the command will exit.
75
77
 
76
78
  This command can also be invoked directly with a browser and version:
77
79
 
@@ -127,6 +129,42 @@ Purges all files created by this command, removing every trace except the execut
127
129
  It will also remove source lines added that pointed to the completions in `~/.zshrc` and `~/.bashrc`.
128
130
  After running a `purge`, all that remains is running `gem uninstall cani` to completely purge it.
129
131
 
132
+ ## Pipe output
133
+
134
+ Last but not least, all `cani` commands can be piped. This will skip running `fzf` and print uncolored output.
135
+
136
+ **use**
137
+ ```sh
138
+ cani use | cat | head -3
139
+ [rc] 97.11% PNG alpha transparency +chr +ff +edge +ie +saf +saf.ios +op +and +bb
140
+ [un] 75.85% Animated PNG (APNG) +chr +ff -edge -ie +saf +saf.ios +op -and -bb
141
+ [ls] 94.32% Video element +chr +ff +edge +ie +saf +saf.ios +op +and +bb
142
+ ```
143
+
144
+ **show**
145
+ ```sh
146
+ cani show | cat | head -3
147
+ ie usage: 3.1899%
148
+ edge usage: 1.8262%
149
+ firefox usage: 5.0480%
150
+ ```
151
+
152
+ **show BROWSER**
153
+ ```sh
154
+ cani show firefox | cat | head -3
155
+ 63 usage: 0.0000%
156
+ 62 usage: 0.0131%
157
+ 61 usage: 0.2184%
158
+ ```
159
+
160
+ **show BROWSER VERSION**
161
+ ```sh
162
+ cani show firefox 63 | cat | head -3
163
+ [rc] [+] PNG alpha transparency
164
+ [un] [+] Animated PNG (APNG)
165
+ [ls] [+] Video element
166
+ ```
167
+
130
168
  ## Contributing
131
169
 
132
170
  Bug reports and pull requests are welcome on GitHub at https://github.com/sidofc/cani. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
data/lib/cani/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cani
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/cani.rb CHANGED
@@ -35,6 +35,15 @@ module Cani
35
35
  puts ' cani use'
36
36
  puts ' cani show ie'
37
37
  puts ' cani show chr.and'
38
+ puts ''
39
+ puts 'Statuses:'
40
+ puts ' [ls] WHATWG Living Standard'
41
+ puts ' [rc] W3C Recommendation'
42
+ puts ' [pr] W3C Proposed Recommendation'
43
+ puts ' [cr] W3C Candidate Recommendation'
44
+ puts ' [wd] W3C Working Draft'
45
+ puts ' [ot] Non-W3C, but reputable'
46
+ puts ' [un] Unofficial, Editor\'s draft or W3C "Note"'
38
47
  end
39
48
 
40
49
  def self.version
@@ -60,9 +69,9 @@ module Cani
60
69
  end
61
70
 
62
71
  def self.use
63
- puts Fzf.pick Fzf.feature_rows,
64
- header: 'use] [' + Api::Feature.support_legend,
65
- colors: %i[green light_black light_white light_black]
72
+ Fzf.pick Fzf.feature_rows,
73
+ header: 'use] [' + Api::Feature.support_legend,
74
+ colors: %i[green light_black light_white light_black]
66
75
  end
67
76
 
68
77
  def self.show(brws = api.config.args[1], version = api.config.args[2])
@@ -16,7 +16,7 @@ _cani_completions() {
16
16
  esac
17
17
  ;;
18
18
  *)
19
- COMPREPLY=($(compgen -W "use show help version" "${COMP_WORDS[COMP_CWORD]}"))
19
+ COMPREPLY=($(compgen -W "use show help version update purge install_completions" "${COMP_WORDS[COMP_CWORD]}"))
20
20
  ;;
21
21
  esac
22
22
  }
@@ -37,3 +37,7 @@ complete -f -c cani -n '__fish_cani_needs_command' -a 'use' -d 'Display an overv
37
37
  complete -f -c cani -n '__fish_cani_needs_command' -a 'show' -d 'Display feature support for a specific browser'
38
38
  complete -f -c cani -n '__fish_cani_needs_command' -a 'help' -d 'Show command help'
39
39
  complete -f -c cani -n '__fish_cani_needs_command' -a 'version' -d 'Print the version number'
40
+ complete -f -c cani -n '__fish_cani_needs_command' -a 'update' -d 'force update api data and completions'
41
+ complete -f -c cani -n '__fish_cani_needs_command' -a 'purge' -d 'remove all completion, configuration files and data stored by this cani'
42
+ complete -f -c cani -n '__fish_cani_needs_command' -a 'install_completions' -d 'install completions for bash, zsh and fish'
43
+ # update purge install_completions
@@ -8,7 +8,7 @@
8
8
  function _cani {
9
9
  local line
10
10
 
11
- _arguments -C "1: :(use show help version)" \
11
+ _arguments -C "1: :(use show help version update purge install_completions)" \
12
12
  "*::arg:->args"
13
13
 
14
14
  case $line[1] in
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cani
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sidney Liebrand
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-08 00:00:00.000000000 Z
11
+ date: 2018-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize