doing 1.0.74 → 1.0.75
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 -3
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +5 -3
- 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: 4acc94f7b7b30e01c77c1f5b026e6b815cd1d55b19d2afa7c9a029a46f201659
|
4
|
+
data.tar.gz: e72ee1110adb862162888690ff17002d8cb17e6810362c46994282293b4c8d4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff6f4bb0dad93e88beb67b1e96b8d094a6b6b8afb5785d79472c3946e6ac510f8f1d233133972347ba66e256056296d6905753192d7c81152dc2a186f535acda
|
7
|
+
data.tar.gz: 1d7147a5055e593ff5a5b0116ba71525f66d171b042437836c4112ded26a2c68a8b1a1e1b793b19901b0e69e4da24f9759dbdecfaff0e9563e74f92d049a825e
|
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.74<!--END VER-->.
|
31
31
|
|
32
32
|
$ [sudo] gem install doing
|
33
33
|
|
@@ -621,9 +621,9 @@ Now you can run `doing import --type timing -s SECTION PATH`, where SECTION is t
|
|
621
621
|
|
622
622
|
If you have `fzf` installed (<https://github.com/junegunn/fzf>), you can use `doing select` to get a menu of all your items (or items in a given section) which can be searched with fuzzy matching. The menu allows multiple selections to be acted on directly.
|
623
623
|
|
624
|
-
To use the menu, type a search string or use the arrow keys to navigate up and down. Press tab on an entry you'd like to perform an action on. A marker will show up on the left indicating the entry is selected. Repeat the process and select as many entries as needed. When you hit Return, the selection will be passed back to doing.
|
624
|
+
To use the menu, type a search string or use the arrow keys to navigate up and down. Press tab on an entry you'd like to perform an action on. A marker will show up on the left indicating the entry is selected. Repeat the process and select as many entries as needed. When you hit Return, the selection will be passed back to doing. Use Control-A to select all visible entries.
|
625
625
|
|
626
|
-
Doing can perform several functions with this menu. Not all of doing's features are available, but the core functionality you'd need is there, plus you can open
|
626
|
+
Doing can perform several functions with this menu. Not all of doing's features are available, but the core functionality you'd need is there, plus you can open the selected entries on one page in your text editor, make changes to them, and when you save and close the entries are updated accordingly. This allows editing of everything from timestamps to tags to notes.
|
627
627
|
|
628
628
|
Run `doing help select` for a list of options:
|
629
629
|
|
@@ -641,6 +641,8 @@ For example, `doing select -d -a` would present the menu, and then mark selected
|
|
641
641
|
|
642
642
|
Multiple actions can be performed at once by combining options. You can also combine the `--editor` switch with any other options. Other actions will be performed first, then the entries --- with any modifications performed --- will be presented in the editor for tweaking.
|
643
643
|
|
644
|
+
**Note:** when using the `--editor` flag to open selections in your text editor, entries will be separated by `---` lines. These must remain in place for doing to track the changes. You can do anything you want to the entries, modify dates, change text, add notes, etc., as long as you leave the dividers in place. You can even delete an entry entirely, leaving the dividers around the missing line and the entry will be removed from your doing file when you save and exit the editor.
|
645
|
+
|
644
646
|
---
|
645
647
|
|
646
648
|
## Extras
|
data/lib/doing/version.rb
CHANGED
data/lib/doing/wwid.rb
CHANGED
@@ -807,7 +807,7 @@ class WWID
|
|
807
807
|
out.join('')
|
808
808
|
end
|
809
809
|
|
810
|
-
res = `echo #{Shellwords.escape(options.join("\n"))}|fzf -m`
|
810
|
+
res = `echo #{Shellwords.escape(options.join("\n"))}|fzf -m --bind ctrl-a:select-all`
|
811
811
|
selected = []
|
812
812
|
res.split(/\n/).each do |item|
|
813
813
|
idx = item.match(/^(\d+)\)/)[1].to_i
|
@@ -861,11 +861,13 @@ class WWID
|
|
861
861
|
editable_items << editable
|
862
862
|
end
|
863
863
|
|
864
|
-
new_items = fork_editor(editable_items.join("\n---\n") + "\n\n# You may delete entries, but leave all
|
864
|
+
new_items = fork_editor(editable_items.map(&:strip).join("\n---\n") + "\n\n# You may delete entries, but leave all divider lines in place").split(/\n---\n/)
|
865
865
|
|
866
866
|
new_items.each_with_index do |new_item, i|
|
867
|
+
|
867
868
|
input_lines = new_item.split(/[\n\r]+/).delete_if {|line| line =~ /^#/ || line =~ /^\s*$/ }
|
868
869
|
title = input_lines[0]&.strip
|
870
|
+
|
869
871
|
if title.nil? || title =~ /^---$/ || title.strip.empty?
|
870
872
|
delete_item(selected[i])
|
871
873
|
else
|
@@ -880,7 +882,7 @@ class WWID
|
|
880
882
|
item = selected[i].dup
|
881
883
|
item['title'] = title
|
882
884
|
item['note'] = note
|
883
|
-
item['date'] = Time.parse(date)
|
885
|
+
item['date'] = Time.parse(date) || selected[i]['date']
|
884
886
|
update_item(selected[i], item)
|
885
887
|
end
|
886
888
|
end
|