howzit 2.0.19 → 2.0.20
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/CHANGELOG.md +13 -0
- data/bin/howzit +11 -2
- data/lib/howzit/buildnote.rb +11 -0
- data/lib/howzit/config.rb +1 -1
- data/lib/howzit/prompt.rb +1 -1
- data/lib/howzit/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: 22f532430daee5c4c7a1d662d959aa5141848be745940e497b0f5d5d920e0739
|
4
|
+
data.tar.gz: 4db5982c0f1409754cf41206b747ccc39b02ceacdaf100dc12e32185d8c13602
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d57db8ee804c204c42b1b30fac02bede10a2ec1b46c31aaf33a688a3441c6338e033e568d61eecedf3ec5a0c05087106532504a4c7cfcbff6daf1ccd9efea20
|
7
|
+
data.tar.gz: 99d46ccfe0612d10c832e093a6b1f95fd4c48a72750e2375bc67b5bc8c1a017d15580f5806fa90fb47e8aae6db1f31c3fc931fd51d588ce1aa249bddfe875538
|
data/CHANGELOG.md
CHANGED
data/bin/howzit
CHANGED
@@ -131,13 +131,15 @@ OptionParser.new do |opts|
|
|
131
131
|
Process.exit 0
|
132
132
|
end
|
133
133
|
|
134
|
-
|
134
|
+
editor = File.basename(Howzit.options[:editor])
|
135
|
+
desc = %(Edit buildnotes file in current working directory using editor (#{editor}))
|
135
136
|
opts.on('-e', '--edit', desc) do
|
136
137
|
Howzit.buildnote.edit
|
137
138
|
Process.exit 0
|
138
139
|
end
|
139
140
|
|
140
|
-
|
141
|
+
config_editor = File.basename(Howzit.options[:config_editor])
|
142
|
+
opts.on('--edit-config', "Edit configuration file using editor (#{config_editor})") do
|
141
143
|
Howzit.config.editor
|
142
144
|
Process.exit 0
|
143
145
|
end
|
@@ -151,6 +153,13 @@ OptionParser.new do |opts|
|
|
151
153
|
Howzit.options[:grep] = pat
|
152
154
|
end
|
153
155
|
|
156
|
+
if RbConfig::CONFIG['target_os'] =~ /darwin.*/i
|
157
|
+
opts.on('--hook', 'Copy a link to the build note file, ready for pasting into Hook.app or other notes') do
|
158
|
+
Howzit.buildnote.hook
|
159
|
+
Process.exit 0
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
154
163
|
opts.on('-r', '--run', 'Execute @run, @open, and/or @copy commands for given topic') do
|
155
164
|
Howzit.options[:run] = true
|
156
165
|
end
|
data/lib/howzit/buildnote.rb
CHANGED
@@ -72,6 +72,17 @@ module Howzit
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
+
##
|
76
|
+
## Copy a link to the main build note file to clipboard (macOS only)
|
77
|
+
##
|
78
|
+
def hook
|
79
|
+
title = Util.read_file(note_file).note_title(note_file, 20)
|
80
|
+
title = "#{title} build notes"
|
81
|
+
url = "[#{title}](file://#{note_file})"
|
82
|
+
`echo #{Shellwords.escape(url)}'\\c'|pbcopy`
|
83
|
+
Howzit.console.info('Link copied to clipboard.')
|
84
|
+
end
|
85
|
+
|
75
86
|
##
|
76
87
|
## Call grep on all topics, filtering out those that don't match
|
77
88
|
##
|
data/lib/howzit/config.rb
CHANGED
data/lib/howzit/prompt.rb
CHANGED
@@ -100,7 +100,7 @@ module Howzit
|
|
100
100
|
"--height=#{height}",
|
101
101
|
'--header="Use tab to mark multiple selections, enter to display/run"',
|
102
102
|
'--prompt="Select a section > "',
|
103
|
-
|
103
|
+
%(--preview="howzit --no-pager --header-format block --no-color --default --multiple first {}")
|
104
104
|
]
|
105
105
|
res = `echo #{Shellwords.escape(matches.join("\n"))} | fzf #{settings.join(' ')}`.strip
|
106
106
|
if res.nil? || res.empty?
|
data/lib/howzit/version.rb
CHANGED