doing 1.0.79 → 1.0.80
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +21 -39
- 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: 83c61397f2a1827dbe04f16255c1739c8d6a194b636afa4b1181437ffaca2ee8
|
4
|
+
data.tar.gz: b5da9fcae50fb7c90ba70a4b3d28948f551945c92170559f8bb693cda921894b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 181eb1fa0f18e0f4c7678e48b2ae8daf07a85e88842accdf3de7c522dbc022c175067e0226d9faa21e493a654175c80595df1853d97027d6708884cbe24f82e6
|
7
|
+
data.tar.gz: a472b2013051b3525af41577ea0020b5f43e720e2b5d8598eb07b229555310dadd7a1b2cc0a106763def82f2b1920a9acf41f9ac07d077f35543b0b90ed2a631
|
data/README.md
CHANGED
@@ -27,7 +27,7 @@ If there's something I want to look at later but doesn't need to be added to a t
|
|
27
27
|
|
28
28
|
## Installation
|
29
29
|
|
30
|
-
The current version of `doing` is <!--VER-->1.0.
|
30
|
+
The current version of `doing` is <!--VER-->1.0.79<!--END VER-->.
|
31
31
|
|
32
32
|
$ [sudo] gem install doing
|
33
33
|
|
data/lib/doing/version.rb
CHANGED
data/lib/doing/wwid.rb
CHANGED
@@ -772,15 +772,11 @@ class WWID
|
|
772
772
|
## @return (String) The selected option
|
773
773
|
##
|
774
774
|
def choose_from(options, prompt)
|
775
|
-
|
776
|
-
options.
|
777
|
-
|
778
|
-
end
|
779
|
-
print "#{colors['green']}> #{colors['default']}"
|
780
|
-
num = STDIN.gets
|
781
|
-
return false if num =~ /^[a-z ]*$/i
|
775
|
+
fzf = File.join(File.dirname(__FILE__), '../helpers/fuzzyfilefinder')
|
776
|
+
res = `echo #{Shellwords.escape(options.join("\n"))}|#{fzf} --prompt "#{prompt}"`
|
777
|
+
return false if res.strip.size.zero?
|
782
778
|
|
783
|
-
|
779
|
+
res
|
784
780
|
end
|
785
781
|
|
786
782
|
##
|
@@ -847,32 +843,32 @@ class WWID
|
|
847
843
|
unless has_action
|
848
844
|
action = choose_from(
|
849
845
|
[
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
846
|
+
'add tag',
|
847
|
+
'remove tag',
|
848
|
+
'archive',
|
849
|
+
'cancel',
|
850
|
+
'delete',
|
851
|
+
'edit',
|
852
|
+
'finish',
|
853
|
+
'flag',
|
854
|
+
'move',
|
855
|
+
'output format'
|
860
856
|
],
|
861
|
-
'What do you want to do with the selected items?')
|
857
|
+
'What do you want to do with the selected items? > ')
|
862
858
|
case action
|
863
859
|
when /(add|remove) tag/
|
864
|
-
print
|
860
|
+
print 'Enter tag: '
|
865
861
|
tag = STDIN.gets
|
866
862
|
return if tag =~ /^ *$/
|
867
863
|
opt[:tag] = tag.strip
|
868
864
|
opt[:remove] = true if action =~ /remove tag/
|
869
865
|
when /output format/
|
870
|
-
output_format = choose_from(%w[doing taskpaper json timeline html csv], 'Which output format?')
|
866
|
+
output_format = choose_from(%w[doing taskpaper json timeline html csv], 'Which output format? > ')
|
871
867
|
return if tag =~ /^ *$/
|
872
868
|
opt[:output] = output_format.strip
|
873
|
-
res = yn(
|
869
|
+
res = yn('Save to file?', default_response: 'n')
|
874
870
|
if res
|
875
|
-
print
|
871
|
+
print 'File path/name: '
|
876
872
|
filename = STDIN.gets.strip
|
877
873
|
return if filename.empty?
|
878
874
|
opt[:save_to] = filename
|
@@ -1507,14 +1503,7 @@ class WWID
|
|
1507
1503
|
## @return (String) The selected section name
|
1508
1504
|
##
|
1509
1505
|
def choose_section
|
1510
|
-
sections
|
1511
|
-
puts format('% 3d: %s', i + 1, section)
|
1512
|
-
end
|
1513
|
-
print "#{colors['green']}> #{colors['default']}"
|
1514
|
-
num = STDIN.gets
|
1515
|
-
return false if num =~ /^[a-z ]*$/i
|
1516
|
-
|
1517
|
-
sections[num.to_i - 1]
|
1506
|
+
choose_from(sections, 'Choose a section > ').strip
|
1518
1507
|
end
|
1519
1508
|
|
1520
1509
|
##
|
@@ -1532,14 +1521,7 @@ class WWID
|
|
1532
1521
|
## @return (String) The selected view name
|
1533
1522
|
##
|
1534
1523
|
def choose_view
|
1535
|
-
views
|
1536
|
-
puts format('% 3d: %s', i + 1, view)
|
1537
|
-
end
|
1538
|
-
print '> '
|
1539
|
-
num = STDIN.gets
|
1540
|
-
return false if num =~ /^[a-z ]*$/i
|
1541
|
-
|
1542
|
-
views[num.to_i - 1]
|
1524
|
+
choose_from(views, 'Choose a view > ').strip
|
1543
1525
|
end
|
1544
1526
|
|
1545
1527
|
##
|