doing 2.0.16 → 2.0.17
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 +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/doing.rdoc +1 -1
- data/lib/completion/_doing.zsh +19 -19
- data/lib/completion/doing.bash +28 -28
- data/lib/completion/doing.fish +14 -0
- data/lib/doing/plugins/export/template_export.rb +15 -9
- data/lib/doing/string.rb +22 -9
- data/lib/doing/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: 66694d7857dda9e418974f5f1777d8fb3bf603f3bfbbec8d389fb6ae50b65dbf
|
|
4
|
+
data.tar.gz: 5f49710a4a7c00fe39bdce0491fc15d25ea652c4c3c2c7c30b26527de3438360
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b37aea2aed6b17e72d85e647bac095e251cc30037483195996049f6c994e5c0c1f0b59ef7c09f8d53d06d48cd51b15119e68220e0a9107f768492c74ea66e61b
|
|
7
|
+
data.tar.gz: 83c266d906f82c07d9c6b4932d1e0464b46e56de14ad5bde144d5ee2baa88966f1cbef30c6f6a673107a831476c8115dd088a922ae3dcccb833ccb2a9e1ce5b4
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@ _If you're one of the rare people like me who find this useful, feel free to [bu
|
|
|
6
6
|
|
|
7
7
|
<!--README-->
|
|
8
8
|
|
|
9
|
-
The current version of `doing` is <!--VER-->2.0.
|
|
9
|
+
The current version of `doing` is <!--VER-->2.0.16<!--END VER-->.
|
|
10
10
|
|
|
11
11
|
Find all of the documentation in the [doing wiki](https://github.com/ttscoff/doing/wiki).
|
|
12
12
|
|
data/doing.rdoc
CHANGED
|
@@ -5,7 +5,7 @@ record of what you've been doing, complete with tag-based time tracking. The
|
|
|
5
5
|
command line tool allows you to add entries, annotate with tags and notes, and
|
|
6
6
|
view your entries with myriad options, with a focus on a "natural" language syntax.
|
|
7
7
|
|
|
8
|
-
v2.0.
|
|
8
|
+
v2.0.17
|
|
9
9
|
|
|
10
10
|
=== Global Options
|
|
11
11
|
=== --config_file arg
|
data/lib/completion/_doing.zsh
CHANGED
|
@@ -66,22 +66,22 @@ function _doing() {
|
|
|
66
66
|
args=( )
|
|
67
67
|
;;
|
|
68
68
|
again)
|
|
69
|
-
args=( "(--bool=)--bool=}[Boolean used to combine multiple tags]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-e,--editor}"[Edit duplicated entry with vim before adding]" {-i,--interactive}"[Select item to resume from a menu of matching entries]" "(--in=)--in=}[Add new entry to section]" {-n,--note=}"[Note]" "(--not)--not}[Resume items that *dont* match search/tag filterst* match search/tag filters]" {-s,--section=}"[Get last entry from a specific section]" "(--search=)--search=}[Repeat last entry matching search]" "(--tag=)--tag=}[Repeat last entry matching tags]" {-x,--exact}"[Force exact search string matching]" )
|
|
69
|
+
args=( "(--bool=)--bool=}[Boolean used to combine multiple tags]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-e,--editor}"[Edit duplicated entry with vim before adding]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-i,--interactive}"[Select item to resume from a menu of matching entries]" "(--in=)--in=}[Add new entry to section]" {-n,--note=}"[Note]" "(--not)--not}[Resume items that *dont* match search/tag filterst* match search/tag filters]" {-s,--section=}"[Get last entry from a specific section]" "(--search=)--search=}[Repeat last entry matching search]" "(--tag=)--tag=}[Repeat last entry matching tags]" {-x,--exact}"[Force exact search string matching]" )
|
|
70
70
|
;;
|
|
71
71
|
resume)
|
|
72
|
-
args=( "(--bool=)--bool=}[Boolean used to combine multiple tags]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-e,--editor}"[Edit duplicated entry with vim before adding]" {-i,--interactive}"[Select item to resume from a menu of matching entries]" "(--in=)--in=}[Add new entry to section]" {-n,--note=}"[Note]" "(--not)--not}[Resume items that *dont* match search/tag filterst* match search/tag filters]" {-s,--section=}"[Get last entry from a specific section]" "(--search=)--search=}[Repeat last entry matching search]" "(--tag=)--tag=}[Repeat last entry matching tags]" {-x,--exact}"[Force exact search string matching]" )
|
|
72
|
+
args=( "(--bool=)--bool=}[Boolean used to combine multiple tags]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-e,--editor}"[Edit duplicated entry with vim before adding]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-i,--interactive}"[Select item to resume from a menu of matching entries]" "(--in=)--in=}[Add new entry to section]" {-n,--note=}"[Note]" "(--not)--not}[Resume items that *dont* match search/tag filterst* match search/tag filters]" {-s,--section=}"[Get last entry from a specific section]" "(--search=)--search=}[Repeat last entry matching search]" "(--tag=)--tag=}[Repeat last entry matching tags]" {-x,--exact}"[Force exact search string matching]" )
|
|
73
73
|
;;
|
|
74
74
|
archive)
|
|
75
|
-
args=( "(--before=)--before=}[Archive entries older than date]" "(--bool=)--bool=}[Tag boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-k,--keep=}"[How many items to keep]" "(--label)--label}[Label moved items with @from(SECTION_NAME)]" "(--not)--not}[Show items that *dont* match search stringt* match search string]" "(--search=)--search=}[Search filter]" {-t,--to=}"[Move entries to]" "(--tag=)--tag=}[Tag filter]" {-x,--exact}"[Force exact search string matching]" )
|
|
75
|
+
args=( "(--before=)--before=}[Archive entries older than date]" "(--bool=)--bool=}[Tag boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-k,--keep=}"[How many items to keep]" "(--label)--label}[Label moved items with @from(SECTION_NAME)]" "(--not)--not}[Show items that *dont* match search stringt* match search string]" "(--search=)--search=}[Search filter]" {-t,--to=}"[Move entries to]" "(--tag=)--tag=}[Tag filter]" {-x,--exact}"[Force exact search string matching]" )
|
|
76
76
|
;;
|
|
77
77
|
move)
|
|
78
|
-
args=( "(--before=)--before=}[Archive entries older than date]" "(--bool=)--bool=}[Tag boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-k,--keep=}"[How many items to keep]" "(--label)--label}[Label moved items with @from(SECTION_NAME)]" "(--not)--not}[Show items that *dont* match search stringt* match search string]" "(--search=)--search=}[Search filter]" {-t,--to=}"[Move entries to]" "(--tag=)--tag=}[Tag filter]" {-x,--exact}"[Force exact search string matching]" )
|
|
78
|
+
args=( "(--before=)--before=}[Archive entries older than date]" "(--bool=)--bool=}[Tag boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-k,--keep=}"[How many items to keep]" "(--label)--label}[Label moved items with @from(SECTION_NAME)]" "(--not)--not}[Show items that *dont* match search stringt* match search string]" "(--search=)--search=}[Search filter]" {-t,--to=}"[Move entries to]" "(--tag=)--tag=}[Tag filter]" {-x,--exact}"[Force exact search string matching]" )
|
|
79
79
|
;;
|
|
80
80
|
autotag)
|
|
81
81
|
args=( "(--bool=)--bool=}[Boolean]" {-c,--count=}"[How many recent entries to autotag]" "(--force)--force}[Dont ask permission to autotag all entries when count is 0t ask permission to autotag all entries when count is 0]" {-i,--interactive}"[Select item(s) to tag from a menu of matching entries]" {-s,--section=}"[Section]" "(--search=)--search=}[Autotag entries matching search filter]" "(--tag=)--tag=}[Autotag the last X entries containing TAG]" {-u,--unfinished}"[Autotag last entry]" )
|
|
82
82
|
;;
|
|
83
83
|
cancel)
|
|
84
|
-
args=( {-a,--archive}"[Archive entries]" "(--bool=)--bool=}[Boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-i,--interactive}"[Select item(s) to cancel from a menu of matching entries]" "(--not)--not}[Finish items that *dont* match search/tag filterst* match search/tag filters]" {-s,--section=}"[Section]" "(--search=)--search=}[Cancel the last X entries matching search filter]" "(--tag=)--tag=}[Cancel the last X entries containing TAG]" {-u,--unfinished}"[Cancel last entry]" {-x,--exact}"[Force exact search string matching]" )
|
|
84
|
+
args=( {-a,--archive}"[Archive entries]" "(--bool=)--bool=}[Boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-i,--interactive}"[Select item(s) to cancel from a menu of matching entries]" "(--not)--not}[Finish items that *dont* match search/tag filterst* match search/tag filters]" {-s,--section=}"[Section]" "(--search=)--search=}[Cancel the last X entries matching search filter]" "(--tag=)--tag=}[Cancel the last X entries containing TAG]" {-u,--unfinished}"[Cancel last entry]" {-x,--exact}"[Force exact search string matching]" )
|
|
85
85
|
;;
|
|
86
86
|
choose)
|
|
87
87
|
args=( )
|
|
@@ -102,37 +102,37 @@ function _doing() {
|
|
|
102
102
|
args=( {-a,--archive}"[Immediately archive the entry]" "(--at=)--at=}[Set finish date to specific date/time]" {-b,--back=}"[Backdate start date by interval [4pm|20m|2h|yesterday noon]]" "(--date)--date}[Include date]" {-e,--editor}"[Edit entry with vim]" {-n,--note=}"[Include a note]" {-r,--remove}"[Remove @done tag]" {-s,--section=}"[Section]" {-t,--took=}"[Set completion date to start date plus interval]" {-u,--unfinished}"[Finish last entry not already marked @done]" )
|
|
103
103
|
;;
|
|
104
104
|
finish)
|
|
105
|
-
args=( {-a,--archive}"[Archive entries]" "(--at=)--at=}[Set finish date to specific date/time]" "(--auto)--auto}[Auto-generate finish dates from next entrys start times start time]" {-b,--back=}"[Backdate completed date to date string [4pm|20m|2h|yesterday noon]]" "(--bool=)--bool=}[Boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" "(--date)--date}[Include date]" {-i,--interactive}"[Select item(s) to finish from a menu of matching entries]" "(--not)--not}[Finish items that *dont* match search/tag filterst* match search/tag filters]" {-r,--remove}"[Remove done tag]" {-s,--section=}"[Section]" "(--search=)--search=}[Finish the last X entries matching search filter]" {-t,--took=}"[Set the completed date to the start date plus XX[hmd]]" "(--tag=)--tag=}[Finish the last X entries containing TAG]" {-u,--unfinished}"[Finish last entry]" {-x,--exact}"[Force exact search string matching]" )
|
|
105
|
+
args=( {-a,--archive}"[Archive entries]" "(--at=)--at=}[Set finish date to specific date/time]" "(--auto)--auto}[Auto-generate finish dates from next entrys start times start time]" {-b,--back=}"[Backdate completed date to date string [4pm|20m|2h|yesterday noon]]" "(--bool=)--bool=}[Boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" "(--date)--date}[Include date]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-i,--interactive}"[Select item(s) to finish from a menu of matching entries]" "(--not)--not}[Finish items that *dont* match search/tag filterst* match search/tag filters]" {-r,--remove}"[Remove done tag]" {-s,--section=}"[Section]" "(--search=)--search=}[Finish the last X entries matching search filter]" {-t,--took=}"[Set the completed date to the start date plus XX[hmd]]" "(--tag=)--tag=}[Finish the last X entries containing TAG]" {-u,--unfinished}"[Finish last entry]" {-x,--exact}"[Force exact search string matching]" )
|
|
106
106
|
;;
|
|
107
107
|
grep)
|
|
108
|
-
args=( "(--after=)--after=}[Constrain search to entries newer than date]" "(--before=)--before=}[Constrain search to entries older than date]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-i,--interactive}"[Display an interactive menu of results to perform further operations]" "(--not)--not}[Show items that *dont* match search stringt* match search string]" {-o,--output=}"[Output to export format]" "(--only_timed)--only_timed}[Only show items with recorded time intervals]" {-s,--section=}"[Section]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show intervals with totals at the end of output]" {-x,--exact}"[Force exact string matching]" )
|
|
108
|
+
args=( "(--after=)--after=}[Constrain search to entries newer than date]" "(--before=)--before=}[Constrain search to entries older than date]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-i,--interactive}"[Display an interactive menu of results to perform further operations]" "(--not)--not}[Show items that *dont* match search stringt* match search string]" {-o,--output=}"[Output to export format]" "(--only_timed)--only_timed}[Only show items with recorded time intervals]" {-s,--section=}"[Section]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show intervals with totals at the end of output]" {-x,--exact}"[Force exact string matching]" )
|
|
109
109
|
;;
|
|
110
110
|
search)
|
|
111
|
-
args=( "(--after=)--after=}[Constrain search to entries newer than date]" "(--before=)--before=}[Constrain search to entries older than date]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-i,--interactive}"[Display an interactive menu of results to perform further operations]" "(--not)--not}[Show items that *dont* match search stringt* match search string]" {-o,--output=}"[Output to export format]" "(--only_timed)--only_timed}[Only show items with recorded time intervals]" {-s,--section=}"[Section]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show intervals with totals at the end of output]" {-x,--exact}"[Force exact string matching]" )
|
|
111
|
+
args=( "(--after=)--after=}[Constrain search to entries newer than date]" "(--before=)--before=}[Constrain search to entries older than date]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-i,--interactive}"[Display an interactive menu of results to perform further operations]" "(--not)--not}[Show items that *dont* match search stringt* match search string]" {-o,--output=}"[Output to export format]" "(--only_timed)--only_timed}[Only show items with recorded time intervals]" {-s,--section=}"[Section]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show intervals with totals at the end of output]" {-x,--exact}"[Force exact string matching]" )
|
|
112
112
|
;;
|
|
113
113
|
help)
|
|
114
114
|
args=( )
|
|
115
115
|
;;
|
|
116
116
|
import)
|
|
117
|
-
args=( "(--after=)--after=}[Import entries newer than date]" "(--autotag)--autotag}[Autotag entries]" "(--before=)--before=}[Import entries older than date]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-f,--from=}"[Date range to import]" "(--not)--not}[Import items that *dont* match search/tag/date filterst* match search/tag/date filters]" "(--only_timed)--only_timed}[Only import items with recorded time intervals]" "(--overlap)--overlap}[Allow entries that overlap existing times]" "(--prefix=)--prefix=}[Prefix entries with]" {-s,--section=}"[Target section]" "(--search=)--search=}[Only import items matching search]" "(--tag=)--tag=}[Tag all imported entries]" "(--type=)--type=}[Import type]" {-x,--exact}"[Force exact search string matching]" )
|
|
117
|
+
args=( "(--after=)--after=}[Import entries newer than date]" "(--autotag)--autotag}[Autotag entries]" "(--before=)--before=}[Import entries older than date]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-f,--from=}"[Date range to import]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" "(--not)--not}[Import items that *dont* match search/tag/date filterst* match search/tag/date filters]" "(--only_timed)--only_timed}[Only import items with recorded time intervals]" "(--overlap)--overlap}[Allow entries that overlap existing times]" "(--prefix=)--prefix=}[Prefix entries with]" {-s,--section=}"[Target section]" "(--search=)--search=}[Only import items matching search]" "(--tag=)--tag=}[Tag all imported entries]" "(--type=)--type=}[Import type]" {-x,--exact}"[Force exact search string matching]" )
|
|
118
118
|
;;
|
|
119
119
|
last)
|
|
120
|
-
args=( "(--bool=)--bool=}[Tag boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-e,--editor}"[Edit entry with vim]" "(--not)--not}[Show items that *dont* match search string or tag filtert* match search string or tag filter]" {-s,--section=}"[Specify a section]" "(--search=)--search=}[Search filter]" "(--tag=)--tag=}[Tag filter]" {-x,--exact}"[Force exact search string matching]" )
|
|
120
|
+
args=( "(--bool=)--bool=}[Tag boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-e,--editor}"[Edit entry with vim]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" "(--not)--not}[Show items that *dont* match search string or tag filtert* match search string or tag filter]" {-s,--section=}"[Specify a section]" "(--search=)--search=}[Search filter]" "(--tag=)--tag=}[Tag filter]" {-x,--exact}"[Force exact search string matching]" )
|
|
121
121
|
;;
|
|
122
122
|
later)
|
|
123
123
|
args=( {-b,--back=}"[Backdate start time to date string [4pm|20m|2h|yesterday noon]]" {-e,--editor}"[Edit entry with vim]" {-n,--note=}"[Note]" )
|
|
124
124
|
;;
|
|
125
125
|
mark)
|
|
126
|
-
args=( "(--bool=)--bool=}[Boolean]" {-c,--count=}"[How many recent entries to tag]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-d,--date}"[Include current date/time with tag]" "(--force)--force}[Dont ask permission to flag all entries when count is 0t ask permission to flag all entries when count is 0]" {-i,--interactive}"[Select item(s) to flag from a menu of matching entries]" "(--not)--not}[Flag items that *dont* match search/tag/date filterst* match search/tag/date filters]" {-r,--remove}"[Remove flag]" {-s,--section=}"[Section]" "(--search=)--search=}[Flag the last entry matching search filter]" "(--tag=)--tag=}[Flag the last entry containing TAG]" {-u,--unfinished}"[Flag last entry]" {-x,--exact}"[Force exact search string matching]" )
|
|
126
|
+
args=( "(--bool=)--bool=}[Boolean]" {-c,--count=}"[How many recent entries to tag]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-d,--date}"[Include current date/time with tag]" "(--force)--force}[Dont ask permission to flag all entries when count is 0t ask permission to flag all entries when count is 0]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-i,--interactive}"[Select item(s) to flag from a menu of matching entries]" "(--not)--not}[Flag items that *dont* match search/tag/date filterst* match search/tag/date filters]" {-r,--remove}"[Remove flag]" {-s,--section=}"[Section]" "(--search=)--search=}[Flag the last entry matching search filter]" "(--tag=)--tag=}[Flag the last entry containing TAG]" {-u,--unfinished}"[Flag last entry]" {-x,--exact}"[Force exact search string matching]" )
|
|
127
127
|
;;
|
|
128
128
|
flag)
|
|
129
|
-
args=( "(--bool=)--bool=}[Boolean]" {-c,--count=}"[How many recent entries to tag]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-d,--date}"[Include current date/time with tag]" "(--force)--force}[Dont ask permission to flag all entries when count is 0t ask permission to flag all entries when count is 0]" {-i,--interactive}"[Select item(s) to flag from a menu of matching entries]" "(--not)--not}[Flag items that *dont* match search/tag/date filterst* match search/tag/date filters]" {-r,--remove}"[Remove flag]" {-s,--section=}"[Section]" "(--search=)--search=}[Flag the last entry matching search filter]" "(--tag=)--tag=}[Flag the last entry containing TAG]" {-u,--unfinished}"[Flag last entry]" {-x,--exact}"[Force exact search string matching]" )
|
|
129
|
+
args=( "(--bool=)--bool=}[Boolean]" {-c,--count=}"[How many recent entries to tag]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-d,--date}"[Include current date/time with tag]" "(--force)--force}[Dont ask permission to flag all entries when count is 0t ask permission to flag all entries when count is 0]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-i,--interactive}"[Select item(s) to flag from a menu of matching entries]" "(--not)--not}[Flag items that *dont* match search/tag/date filterst* match search/tag/date filters]" {-r,--remove}"[Remove flag]" {-s,--section=}"[Section]" "(--search=)--search=}[Flag the last entry matching search filter]" "(--tag=)--tag=}[Flag the last entry containing TAG]" {-u,--unfinished}"[Flag last entry]" {-x,--exact}"[Force exact search string matching]" )
|
|
130
130
|
;;
|
|
131
131
|
meanwhile)
|
|
132
132
|
args=( {-a,--archive}"[Archive previous @meanwhile entry]" {-b,--back=}"[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]" {-e,--editor}"[Edit entry with vim]" {-n,--note=}"[Note]" {-s,--section=}"[Section]" )
|
|
133
133
|
;;
|
|
134
134
|
note)
|
|
135
|
-
args=( "(--bool=)--bool=}[Boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-e,--editor}"[Edit entry with vim]" {-i,--interactive}"[Select item for new note from a menu of matching entries]" "(--not)--not}[Add note to item that *doesnt* match search/tag filterst* match search/tag filters]" {-r,--remove}"[Replace/Remove last entrys notes note]" {-s,--section=}"[Section]" "(--search=)--search=}[Add/remove note from last entry matching search filter]" "(--tag=)--tag=}[Add/remove note from last entry matching tag]" {-x,--exact}"[Force exact search string matching]" )
|
|
135
|
+
args=( "(--bool=)--bool=}[Boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-e,--editor}"[Edit entry with vim]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-i,--interactive}"[Select item for new note from a menu of matching entries]" "(--not)--not}[Add note to item that *doesnt* match search/tag filterst* match search/tag filters]" {-r,--remove}"[Replace/Remove last entrys notes note]" {-s,--section=}"[Section]" "(--search=)--search=}[Add/remove note from last entry matching search filter]" "(--tag=)--tag=}[Add/remove note from last entry matching tag]" {-x,--exact}"[Force exact search string matching]" )
|
|
136
136
|
;;
|
|
137
137
|
now)
|
|
138
138
|
args=( {-b,--back=}"[Backdate start time [4pm|20m|2h|yesterday noon]]" {-e,--editor}"[Edit entry with vim]" {-f,--finish_last}"[Timed entry]" {-n,--note=}"[Include a note]" {-s,--section=}"[Section]" )
|
|
@@ -153,13 +153,13 @@ function _doing() {
|
|
|
153
153
|
args=( {-i,--interactive}"[Select from a menu of matching entries to perform additional operations]" {-s,--section=}"[Section]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show intervals with totals at the end of output]" )
|
|
154
154
|
;;
|
|
155
155
|
reset)
|
|
156
|
-
args=( "(--bool=)--bool=}[Boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-i,--interactive}"[Select from a menu of matching entries]" "(--not)--not}[Reset items that *dont* match search/tag filterst* match search/tag filters]" {-r,--resume}"[Resume entry]" {-s,--section=}"[Limit search to section]" "(--search=)--search=}[Reset last entry matching search filter]" "(--tag=)--tag=}[Reset last entry matching tag]" {-x,--exact}"[Force exact search string matching]" )
|
|
156
|
+
args=( "(--bool=)--bool=}[Boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-i,--interactive}"[Select from a menu of matching entries]" "(--not)--not}[Reset items that *dont* match search/tag filterst* match search/tag filters]" {-r,--resume}"[Resume entry]" {-s,--section=}"[Limit search to section]" "(--search=)--search=}[Reset last entry matching search filter]" "(--tag=)--tag=}[Reset last entry matching tag]" {-x,--exact}"[Force exact search string matching]" )
|
|
157
157
|
;;
|
|
158
158
|
begin)
|
|
159
|
-
args=( "(--bool=)--bool=}[Boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-i,--interactive}"[Select from a menu of matching entries]" "(--not)--not}[Reset items that *dont* match search/tag filterst* match search/tag filters]" {-r,--resume}"[Resume entry]" {-s,--section=}"[Limit search to section]" "(--search=)--search=}[Reset last entry matching search filter]" "(--tag=)--tag=}[Reset last entry matching tag]" {-x,--exact}"[Force exact search string matching]" )
|
|
159
|
+
args=( "(--bool=)--bool=}[Boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-i,--interactive}"[Select from a menu of matching entries]" "(--not)--not}[Reset items that *dont* match search/tag filterst* match search/tag filters]" {-r,--resume}"[Resume entry]" {-s,--section=}"[Limit search to section]" "(--search=)--search=}[Reset last entry matching search filter]" "(--tag=)--tag=}[Reset last entry matching tag]" {-x,--exact}"[Force exact search string matching]" )
|
|
160
160
|
;;
|
|
161
161
|
rotate)
|
|
162
|
-
args=( "(--before=)--before=}[Rotate entries older than date]" "(--bool=)--bool=}[Tag boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-k,--keep=}"[How many items to keep in each section]" "(--not)--not}[Rotate items that *dont* match search string or tag filtert* match search string or tag filter]" {-s,--section=}"[Section to rotate]" "(--search=)--search=}[Search filter]" "(--tag=)--tag=}[Tag filter]" {-x,--exact}"[Force exact search string matching]" )
|
|
162
|
+
args=( "(--before=)--before=}[Rotate entries older than date]" "(--bool=)--bool=}[Tag boolean]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-k,--keep=}"[How many items to keep in each section]" "(--not)--not}[Rotate items that *dont* match search string or tag filtert* match search string or tag filter]" {-s,--section=}"[Section to rotate]" "(--search=)--search=}[Search filter]" "(--tag=)--tag=}[Tag filter]" {-x,--exact}"[Force exact search string matching]" )
|
|
163
163
|
;;
|
|
164
164
|
sections)
|
|
165
165
|
args=( {-c,--column}"[List in single column]" )
|
|
@@ -168,13 +168,13 @@ function _doing() {
|
|
|
168
168
|
args=( {-a,--archive}"[Archive selected items]" "(--resume)--resume}[Copy selection as a new entry with current time and no @done tag]" {-c,--cancel}"[Cancel selected items]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-d,--delete}"[Delete selected items]" {-e,--editor}"[Edit selected item(s)]" {-f,--finish}"[Add @done with current time to selected item(s)]" "(--flag)--flag}[Add flag to selected item(s)]" "(--force)--force}[Perform action without confirmation]" {-m,--move=}"[Move selected items to section]" "(--menu)--menu}[Use --no-menu to skip the interactive menu]" "(--not)--not}[Select items that *dont* match search/tag filterst* match search/tag filters]" {-o,--output=}"[Output entries to format]" "(--search=)--search=}[Initial search query for filtering]" {-r,--remove}"[Reverse -c]" {-s,--section=}"[Select from a specific section]" "(--save_to=)--save_to=}[Save selected entries to file using --output format]" {-t,--tag=}"[Tag selected entries]" {-x,--exact}"[Force exact search string matching]" )
|
|
169
169
|
;;
|
|
170
170
|
show)
|
|
171
|
-
args=( {-a,--age=}"[Age]" "(--after=)--after=}[View entries newer than date]" {-b,--bool=}"[Tag boolean]" "(--before=)--before=}[View entries older than date]" {-c,--count=}"[Max count to show]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-f,--from=}"[Date range to show]" {-i,--interactive}"[Select from a menu of matching entries to perform additional operations]" "(--not)--not}[Show items that *dont* match search/tag/date filterst* match search/tag/date filters]" {-o,--output=}"[Output to export format]" "(--only_timed)--only_timed}[Only show items with recorded time intervals]" {-s,--sort=}"[Sort order]" "(--search=)--search=}[Search filter]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag=)--tag=}[Tag filter]" "(--tag_order=)--tag_order=}[Tag sort direction]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show intervals with totals at the end of output]" {-x,--exact}"[Force exact search string matching]" )
|
|
171
|
+
args=( {-a,--age=}"[Age]" "(--after=)--after=}[View entries newer than date]" {-b,--bool=}"[Tag boolean]" "(--before=)--before=}[View entries older than date]" {-c,--count=}"[Max count to show]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-f,--from=}"[Date range to show]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-i,--interactive}"[Select from a menu of matching entries to perform additional operations]" "(--not)--not}[Show items that *dont* match search/tag/date filterst* match search/tag/date filters]" {-o,--output=}"[Output to export format]" "(--only_timed)--only_timed}[Only show items with recorded time intervals]" {-s,--sort=}"[Sort order]" "(--search=)--search=}[Search filter]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag=)--tag=}[Tag filter]" "(--tag_order=)--tag_order=}[Tag sort direction]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show intervals with totals at the end of output]" {-x,--exact}"[Force exact search string matching]" )
|
|
172
172
|
;;
|
|
173
173
|
since)
|
|
174
174
|
args=( {-o,--output=}"[Output to export format]" {-s,--section=}"[Section]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show time totals at the end of output]" )
|
|
175
175
|
;;
|
|
176
176
|
tag)
|
|
177
|
-
args=( {-a,--autotag}"[Autotag entries based on autotag configuration in ~/]" "(--bool=)--bool=}[Boolean]" {-c,--count=}"[How many recent entries to tag]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-d,--date}"[Include current date/time with tag]" "(--force)--force}[Dont ask permission to tag all entries when count is 0t ask permission to tag all entries when count is 0]" {-i,--interactive}"[Select item(s) to tag from a menu of matching entries]" "(--not)--not}[Tag items that *dont* match search/tag filterst* match search/tag filters]" {-r,--remove}"[Remove given tag(s)]" "(--regex)--regex}[Interpret tag string as regular expression]" "(--rename=)--rename=}[Replace existing tag with tag argument]" {-s,--section=}"[Section]" "(--search=)--search=}[Tag entries matching search filter]" "(--tag=)--tag=}[Tag the last X entries containing TAG]" {-u,--unfinished}"[Tag last entry]" {-x,--exact}"[Force exact search string matching]" )
|
|
177
|
+
args=( {-a,--autotag}"[Autotag entries based on autotag configuration in ~/]" "(--bool=)--bool=}[Boolean]" {-c,--count=}"[How many recent entries to tag]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" {-d,--date}"[Include current date/time with tag]" "(--force)--force}[Dont ask permission to tag all entries when count is 0t ask permission to tag all entries when count is 0]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-i,--interactive}"[Select item(s) to tag from a menu of matching entries]" "(--not)--not}[Tag items that *dont* match search/tag filterst* match search/tag filters]" {-r,--remove}"[Remove given tag(s)]" "(--regex)--regex}[Interpret tag string as regular expression]" "(--rename=)--rename=}[Replace existing tag with tag argument]" {-s,--section=}"[Section]" "(--search=)--search=}[Tag entries matching search filter]" "(--tag=)--tag=}[Tag the last X entries containing TAG]" {-u,--unfinished}"[Tag last entry]" {-x,--exact}"[Force exact search string matching]" )
|
|
178
178
|
;;
|
|
179
179
|
template)
|
|
180
180
|
args=( {-l,--list}"[List all available templates]" )
|
|
@@ -189,7 +189,7 @@ function _doing() {
|
|
|
189
189
|
args=( {-f,--file=}"[Specify alternate doing file]" )
|
|
190
190
|
;;
|
|
191
191
|
view)
|
|
192
|
-
args=( "(--after=)--after=}[View entries newer than date]" {-b,--bool=}"[Tag boolean]" "(--before=)--before=}[View entries older than date]" {-c,--count=}"[Count to display]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" "(--color)--color}[Include colors in output]" {-i,--interactive}"[Select from a menu of matching entries to perform additional operations]" "(--not)--not}[Show items that *dont* match search stringt* match search string]" {-o,--output=}"[Output to export format]" "(--only_timed)--only_timed}[Only show items with recorded time intervals]" {-s,--section=}"[Section]" "(--search=)--search=}[Search filter]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag=)--tag=}[Tag filter]" "(--tag_order=)--tag_order=}[Tag sort direction]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show intervals with totals at the end of output]" {-x,--exact}"[Force exact search string matching]" )
|
|
192
|
+
args=( "(--after=)--after=}[View entries newer than date]" {-b,--bool=}"[Tag boolean]" "(--before=)--before=}[View entries older than date]" {-c,--count=}"[Count to display]" "(--case=)--case=}[Case sensitivity for search string matching [(c)ase-sensitive]" "(--color)--color}[Include colors in output]" "(--fuzzy)--fuzzy}[Use alternative fuzzy matching for search string]" {-i,--interactive}"[Select from a menu of matching entries to perform additional operations]" "(--not)--not}[Show items that *dont* match search stringt* match search string]" {-o,--output=}"[Output to export format]" "(--only_timed)--only_timed}[Only show items with recorded time intervals]" {-s,--section=}"[Section]" "(--search=)--search=}[Search filter]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag=)--tag=}[Tag filter]" "(--tag_order=)--tag_order=}[Tag sort direction]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show intervals with totals at the end of output]" {-x,--exact}"[Force exact search string matching]" )
|
|
193
193
|
;;
|
|
194
194
|
views)
|
|
195
195
|
args=( {-c,--column}"[List in single column]" )
|
data/lib/completion/doing.bash
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
_doing_again() {
|
|
2
2
|
|
|
3
3
|
if [[ "$token" == --* ]]; then
|
|
4
|
-
COMPREPLY=( $( compgen -W '--bool --case --editor --interactive --in --note --not --section --search --tag --exact' -- $token ) )
|
|
4
|
+
COMPREPLY=( $( compgen -W '--bool --case --editor --fuzzy --interactive --in --note --not --section --search --tag --exact' -- $token ) )
|
|
5
5
|
elif [[ "$token" == -* ]]; then
|
|
6
|
-
COMPREPLY=( $( compgen -W '-e -i -n -s -x --bool --case --editor --interactive --in --note --not --section --search --tag --exact' -- $token ) )
|
|
6
|
+
COMPREPLY=( $( compgen -W '-e -i -n -s -x --bool --case --editor --fuzzy --interactive --in --note --not --section --search --tag --exact' -- $token ) )
|
|
7
7
|
|
|
8
8
|
fi
|
|
9
9
|
}
|
|
@@ -16,9 +16,9 @@ local words=$(doing sections)
|
|
|
16
16
|
IFS="$OLD_IFS"
|
|
17
17
|
|
|
18
18
|
if [[ "$token" == --* ]]; then
|
|
19
|
-
COMPREPLY=( $( compgen -W '--before --bool --case --keep --label --not --search --to --tag --exact' -- $token ) )
|
|
19
|
+
COMPREPLY=( $( compgen -W '--before --bool --case --fuzzy --keep --label --not --search --to --tag --exact' -- $token ) )
|
|
20
20
|
elif [[ "$token" == -* ]]; then
|
|
21
|
-
COMPREPLY=( $( compgen -W '-k -t -x --before --bool --case --keep --label --not --search --to --tag --exact' -- $token ) )
|
|
21
|
+
COMPREPLY=( $( compgen -W '-k -t -x --before --bool --case --fuzzy --keep --label --not --search --to --tag --exact' -- $token ) )
|
|
22
22
|
else
|
|
23
23
|
local nocasematchWasOff=0
|
|
24
24
|
shopt nocasematch >/dev/null || nocasematchWasOff=1
|
|
@@ -51,9 +51,9 @@ _doing_autotag() {
|
|
|
51
51
|
_doing_cancel() {
|
|
52
52
|
|
|
53
53
|
if [[ "$token" == --* ]]; then
|
|
54
|
-
COMPREPLY=( $( compgen -W '--archive --bool --case --interactive --not --section --search --tag --unfinished --exact' -- $token ) )
|
|
54
|
+
COMPREPLY=( $( compgen -W '--archive --bool --case --fuzzy --interactive --not --section --search --tag --unfinished --exact' -- $token ) )
|
|
55
55
|
elif [[ "$token" == -* ]]; then
|
|
56
|
-
COMPREPLY=( $( compgen -W '-a -i -s -u -x --archive --bool --case --interactive --not --section --search --tag --unfinished --exact' -- $token ) )
|
|
56
|
+
COMPREPLY=( $( compgen -W '-a -i -s -u -x --archive --bool --case --fuzzy --interactive --not --section --search --tag --unfinished --exact' -- $token ) )
|
|
57
57
|
|
|
58
58
|
fi
|
|
59
59
|
}
|
|
@@ -91,9 +91,9 @@ _doing_done() {
|
|
|
91
91
|
_doing_finish() {
|
|
92
92
|
|
|
93
93
|
if [[ "$token" == --* ]]; then
|
|
94
|
-
COMPREPLY=( $( compgen -W '--archive --at --auto --back --bool --case --date --interactive --not --remove --section --search --took --tag --unfinished --exact' -- $token ) )
|
|
94
|
+
COMPREPLY=( $( compgen -W '--archive --at --auto --back --bool --case --date --fuzzy --interactive --not --remove --section --search --took --tag --unfinished --exact' -- $token ) )
|
|
95
95
|
elif [[ "$token" == -* ]]; then
|
|
96
|
-
COMPREPLY=( $( compgen -W '-a -b -i -r -s -t -u -x --archive --at --auto --back --bool --case --date --interactive --not --remove --section --search --took --tag --unfinished --exact' -- $token ) )
|
|
96
|
+
COMPREPLY=( $( compgen -W '-a -b -i -r -s -t -u -x --archive --at --auto --back --bool --case --date --fuzzy --interactive --not --remove --section --search --took --tag --unfinished --exact' -- $token ) )
|
|
97
97
|
|
|
98
98
|
fi
|
|
99
99
|
}
|
|
@@ -101,9 +101,9 @@ _doing_finish() {
|
|
|
101
101
|
_doing_grep() {
|
|
102
102
|
|
|
103
103
|
if [[ "$token" == --* ]]; then
|
|
104
|
-
COMPREPLY=( $( compgen -W '--after --before --case --interactive --not --output --only_timed --section --times --tag_sort --totals --exact' -- $token ) )
|
|
104
|
+
COMPREPLY=( $( compgen -W '--after --before --case --fuzzy --interactive --not --output --only_timed --section --times --tag_sort --totals --exact' -- $token ) )
|
|
105
105
|
elif [[ "$token" == -* ]]; then
|
|
106
|
-
COMPREPLY=( $( compgen -W '-i -o -s -t -x --after --before --case --interactive --not --output --only_timed --section --times --tag_sort --totals --exact' -- $token ) )
|
|
106
|
+
COMPREPLY=( $( compgen -W '-i -o -s -t -x --after --before --case --fuzzy --interactive --not --output --only_timed --section --times --tag_sort --totals --exact' -- $token ) )
|
|
107
107
|
|
|
108
108
|
fi
|
|
109
109
|
}
|
|
@@ -121,9 +121,9 @@ _doing_help() {
|
|
|
121
121
|
_doing_import() {
|
|
122
122
|
|
|
123
123
|
if [[ "$token" == --* ]]; then
|
|
124
|
-
COMPREPLY=( $( compgen -W '--after --autotag --before --case --from --not --only_timed --overlap --prefix --section --search --tag --type --exact' -- $token ) )
|
|
124
|
+
COMPREPLY=( $( compgen -W '--after --autotag --before --case --from --fuzzy --not --only_timed --overlap --prefix --section --search --tag --type --exact' -- $token ) )
|
|
125
125
|
elif [[ "$token" == -* ]]; then
|
|
126
|
-
COMPREPLY=( $( compgen -W '-f -s -x --after --autotag --before --case --from --not --only_timed --overlap --prefix --section --search --tag --type --exact' -- $token ) )
|
|
126
|
+
COMPREPLY=( $( compgen -W '-f -s -x --after --autotag --before --case --from --fuzzy --not --only_timed --overlap --prefix --section --search --tag --type --exact' -- $token ) )
|
|
127
127
|
|
|
128
128
|
fi
|
|
129
129
|
}
|
|
@@ -131,9 +131,9 @@ _doing_import() {
|
|
|
131
131
|
_doing_last() {
|
|
132
132
|
|
|
133
133
|
if [[ "$token" == --* ]]; then
|
|
134
|
-
COMPREPLY=( $( compgen -W '--bool --case --editor --not --section --search --tag --exact' -- $token ) )
|
|
134
|
+
COMPREPLY=( $( compgen -W '--bool --case --editor --fuzzy --not --section --search --tag --exact' -- $token ) )
|
|
135
135
|
elif [[ "$token" == -* ]]; then
|
|
136
|
-
COMPREPLY=( $( compgen -W '-e -s -x --bool --case --editor --not --section --search --tag --exact' -- $token ) )
|
|
136
|
+
COMPREPLY=( $( compgen -W '-e -s -x --bool --case --editor --fuzzy --not --section --search --tag --exact' -- $token ) )
|
|
137
137
|
|
|
138
138
|
fi
|
|
139
139
|
}
|
|
@@ -151,9 +151,9 @@ _doing_later() {
|
|
|
151
151
|
_doing_mark() {
|
|
152
152
|
|
|
153
153
|
if [[ "$token" == --* ]]; then
|
|
154
|
-
COMPREPLY=( $( compgen -W '--bool --count --case --date --force --interactive --not --remove --section --search --tag --unfinished --exact' -- $token ) )
|
|
154
|
+
COMPREPLY=( $( compgen -W '--bool --count --case --date --force --fuzzy --interactive --not --remove --section --search --tag --unfinished --exact' -- $token ) )
|
|
155
155
|
elif [[ "$token" == -* ]]; then
|
|
156
|
-
COMPREPLY=( $( compgen -W '-c -d -i -r -s -u -x --bool --count --case --date --force --interactive --not --remove --section --search --tag --unfinished --exact' -- $token ) )
|
|
156
|
+
COMPREPLY=( $( compgen -W '-c -d -i -r -s -u -x --bool --count --case --date --force --fuzzy --interactive --not --remove --section --search --tag --unfinished --exact' -- $token ) )
|
|
157
157
|
|
|
158
158
|
fi
|
|
159
159
|
}
|
|
@@ -171,9 +171,9 @@ _doing_meanwhile() {
|
|
|
171
171
|
_doing_note() {
|
|
172
172
|
|
|
173
173
|
if [[ "$token" == --* ]]; then
|
|
174
|
-
COMPREPLY=( $( compgen -W '--bool --case --editor --interactive --not --remove --section --search --tag --exact' -- $token ) )
|
|
174
|
+
COMPREPLY=( $( compgen -W '--bool --case --editor --fuzzy --interactive --not --remove --section --search --tag --exact' -- $token ) )
|
|
175
175
|
elif [[ "$token" == -* ]]; then
|
|
176
|
-
COMPREPLY=( $( compgen -W '-e -i -r -s -x --bool --case --editor --interactive --not --remove --section --search --tag --exact' -- $token ) )
|
|
176
|
+
COMPREPLY=( $( compgen -W '-e -i -r -s -x --bool --case --editor --fuzzy --interactive --not --remove --section --search --tag --exact' -- $token ) )
|
|
177
177
|
|
|
178
178
|
fi
|
|
179
179
|
}
|
|
@@ -231,9 +231,9 @@ _doing_recent() {
|
|
|
231
231
|
_doing_reset() {
|
|
232
232
|
|
|
233
233
|
if [[ "$token" == --* ]]; then
|
|
234
|
-
COMPREPLY=( $( compgen -W '--bool --case --interactive --not --resume --section --search --tag --exact' -- $token ) )
|
|
234
|
+
COMPREPLY=( $( compgen -W '--bool --case --fuzzy --interactive --not --resume --section --search --tag --exact' -- $token ) )
|
|
235
235
|
elif [[ "$token" == -* ]]; then
|
|
236
|
-
COMPREPLY=( $( compgen -W '-i -r -s -x --bool --case --interactive --not --resume --section --search --tag --exact' -- $token ) )
|
|
236
|
+
COMPREPLY=( $( compgen -W '-i -r -s -x --bool --case --fuzzy --interactive --not --resume --section --search --tag --exact' -- $token ) )
|
|
237
237
|
|
|
238
238
|
fi
|
|
239
239
|
}
|
|
@@ -241,9 +241,9 @@ _doing_reset() {
|
|
|
241
241
|
_doing_rotate() {
|
|
242
242
|
|
|
243
243
|
if [[ "$token" == --* ]]; then
|
|
244
|
-
COMPREPLY=( $( compgen -W '--before --bool --case --keep --not --section --search --tag --exact' -- $token ) )
|
|
244
|
+
COMPREPLY=( $( compgen -W '--before --bool --case --fuzzy --keep --not --section --search --tag --exact' -- $token ) )
|
|
245
245
|
elif [[ "$token" == -* ]]; then
|
|
246
|
-
COMPREPLY=( $( compgen -W '-k -s -x --before --bool --case --keep --not --section --search --tag --exact' -- $token ) )
|
|
246
|
+
COMPREPLY=( $( compgen -W '-k -s -x --before --bool --case --fuzzy --keep --not --section --search --tag --exact' -- $token ) )
|
|
247
247
|
|
|
248
248
|
fi
|
|
249
249
|
}
|
|
@@ -276,9 +276,9 @@ local words=$(doing sections)
|
|
|
276
276
|
IFS="$OLD_IFS"
|
|
277
277
|
|
|
278
278
|
if [[ "$token" == --* ]]; then
|
|
279
|
-
COMPREPLY=( $( compgen -W '--age --after --bool --before --count --case --from --interactive --not --output --only_timed --sort --search --times --tag --tag_order --tag_sort --totals --exact' -- $token ) )
|
|
279
|
+
COMPREPLY=( $( compgen -W '--age --after --bool --before --count --case --from --fuzzy --interactive --not --output --only_timed --sort --search --times --tag --tag_order --tag_sort --totals --exact' -- $token ) )
|
|
280
280
|
elif [[ "$token" == -* ]]; then
|
|
281
|
-
COMPREPLY=( $( compgen -W '-a -b -c -f -i -o -s -t -x --age --after --bool --before --count --case --from --interactive --not --output --only_timed --sort --search --times --tag --tag_order --tag_sort --totals --exact' -- $token ) )
|
|
281
|
+
COMPREPLY=( $( compgen -W '-a -b -c -f -i -o -s -t -x --age --after --bool --before --count --case --from --fuzzy --interactive --not --output --only_timed --sort --search --times --tag --tag_order --tag_sort --totals --exact' -- $token ) )
|
|
282
282
|
else
|
|
283
283
|
local nocasematchWasOff=0
|
|
284
284
|
shopt nocasematch >/dev/null || nocasematchWasOff=1
|
|
@@ -311,9 +311,9 @@ _doing_since() {
|
|
|
311
311
|
_doing_tag() {
|
|
312
312
|
|
|
313
313
|
if [[ "$token" == --* ]]; then
|
|
314
|
-
COMPREPLY=( $( compgen -W '--autotag --bool --count --case --date --force --interactive --not --remove --regex --rename --section --search --tag --unfinished --exact' -- $token ) )
|
|
314
|
+
COMPREPLY=( $( compgen -W '--autotag --bool --count --case --date --force --fuzzy --interactive --not --remove --regex --rename --section --search --tag --unfinished --exact' -- $token ) )
|
|
315
315
|
elif [[ "$token" == -* ]]; then
|
|
316
|
-
COMPREPLY=( $( compgen -W '-a -c -d -i -r -s -u -x --autotag --bool --count --case --date --force --interactive --not --remove --regex --rename --section --search --tag --unfinished --exact' -- $token ) )
|
|
316
|
+
COMPREPLY=( $( compgen -W '-a -c -d -i -r -s -u -x --autotag --bool --count --case --date --force --fuzzy --interactive --not --remove --regex --rename --section --search --tag --unfinished --exact' -- $token ) )
|
|
317
317
|
|
|
318
318
|
fi
|
|
319
319
|
}
|
|
@@ -356,9 +356,9 @@ local words=$(doing views)
|
|
|
356
356
|
IFS="$OLD_IFS"
|
|
357
357
|
|
|
358
358
|
if [[ "$token" == --* ]]; then
|
|
359
|
-
COMPREPLY=( $( compgen -W '--after --bool --before --count --case --color --interactive --not --output --only_timed --section --search --times --tag --tag_order --tag_sort --totals --exact' -- $token ) )
|
|
359
|
+
COMPREPLY=( $( compgen -W '--after --bool --before --count --case --color --fuzzy --interactive --not --output --only_timed --section --search --times --tag --tag_order --tag_sort --totals --exact' -- $token ) )
|
|
360
360
|
elif [[ "$token" == -* ]]; then
|
|
361
|
-
COMPREPLY=( $( compgen -W '-b -c -i -o -s -t -x --after --bool --before --count --case --color --interactive --not --output --only_timed --section --search --times --tag --tag_order --tag_sort --totals --exact' -- $token ) )
|
|
361
|
+
COMPREPLY=( $( compgen -W '-b -c -i -o -s -t -x --after --bool --before --count --case --color --fuzzy --interactive --not --output --only_timed --section --search --times --tag --tag_order --tag_sort --totals --exact' -- $token ) )
|
|
362
362
|
else
|
|
363
363
|
local nocasematchWasOff=0
|
|
364
364
|
shopt nocasematch >/dev/null || nocasematchWasOff=1
|
data/lib/completion/doing.fish
CHANGED
|
@@ -99,6 +99,7 @@ complete -xc doing -n '__fish_doing_needs_command' -a 'yesterday' -d List\ entri
|
|
|
99
99
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command again resume' -d Boolean\ used\ to\ combine\ multiple\ tags
|
|
100
100
|
complete -c doing -l case -f -r -n '__fish_doing_using_command again resume' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
101
101
|
complete -c doing -l editor -s e -f -n '__fish_doing_using_command again resume' -d Edit\ duplicated\ entry\ with\ vim\ before\ adding
|
|
102
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command again resume' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
102
103
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command again resume' -d Select\ item\ to\ resume\ from\ a\ menu\ of\ matching\ entries
|
|
103
104
|
complete -c doing -l in -f -r -n '__fish_doing_using_command again resume' -d Add\ new\ entry\ to\ section
|
|
104
105
|
complete -c doing -l note -s n -f -r -n '__fish_doing_using_command again resume' -d Note
|
|
@@ -110,6 +111,7 @@ complete -c doing -l exact -s x -f -n '__fish_doing_using_command again resume'
|
|
|
110
111
|
complete -c doing -l before -f -r -n '__fish_doing_using_command archive move' -d Archive\ entries\ older\ than\ date
|
|
111
112
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command archive move' -d Tag\ boolean
|
|
112
113
|
complete -c doing -l case -f -r -n '__fish_doing_using_command archive move' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
114
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command archive move' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
113
115
|
complete -c doing -l keep -s k -f -r -n '__fish_doing_using_command archive move' -d How\ many\ items\ to\ keep
|
|
114
116
|
complete -c doing -l label -f -n '__fish_doing_using_command archive move' -d Label\ moved\ items\ with\ @from\(SECTION_NAME\)
|
|
115
117
|
complete -c doing -l not -f -n '__fish_doing_using_command archive move' -d Show\ items\ that\ \*don\'t\*\ match\ search\ string
|
|
@@ -128,6 +130,7 @@ complete -c doing -l unfinished -s u -f -n '__fish_doing_using_command autotag'
|
|
|
128
130
|
complete -c doing -l archive -s a -f -n '__fish_doing_using_command cancel' -d Archive\ entries
|
|
129
131
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command cancel' -d Boolean
|
|
130
132
|
complete -c doing -l case -f -r -n '__fish_doing_using_command cancel' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
133
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command cancel' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
131
134
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command cancel' -d Select\ item\(s\)\ to\ cancel\ from\ a\ menu\ of\ matching\ entries
|
|
132
135
|
complete -c doing -l not -f -n '__fish_doing_using_command cancel' -d Finish\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
|
|
133
136
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command cancel' -d Section
|
|
@@ -159,6 +162,7 @@ complete -c doing -l back -s b -f -r -n '__fish_doing_using_command finish' -d B
|
|
|
159
162
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command finish' -d Boolean
|
|
160
163
|
complete -c doing -l case -f -r -n '__fish_doing_using_command finish' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
161
164
|
complete -c doing -l date -f -n '__fish_doing_using_command finish' -d Include\ date
|
|
165
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command finish' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
162
166
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command finish' -d Select\ item\(s\)\ to\ finish\ from\ a\ menu\ of\ matching\ entries
|
|
163
167
|
complete -c doing -l not -f -n '__fish_doing_using_command finish' -d Finish\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
|
|
164
168
|
complete -c doing -l remove -s r -f -n '__fish_doing_using_command finish' -d Remove\ done\ tag
|
|
@@ -171,6 +175,7 @@ complete -c doing -l exact -s x -f -n '__fish_doing_using_command finish' -d Fo
|
|
|
171
175
|
complete -c doing -l after -f -r -n '__fish_doing_using_command grep search' -d Constrain\ search\ to\ entries\ newer\ than\ date
|
|
172
176
|
complete -c doing -l before -f -r -n '__fish_doing_using_command grep search' -d Constrain\ search\ to\ entries\ older\ than\ date
|
|
173
177
|
complete -c doing -l case -f -r -n '__fish_doing_using_command grep search' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
178
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command grep search' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
174
179
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command grep search' -d Display\ an\ interactive\ menu\ of\ results\ to\ perform\ further\ operations
|
|
175
180
|
complete -c doing -l not -f -n '__fish_doing_using_command grep search' -d Show\ items\ that\ \*don\'t\*\ match\ search\ string
|
|
176
181
|
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command grep search' -d Output\ to\ export\ format
|
|
@@ -186,6 +191,7 @@ complete -c doing -l autotag -f -n '__fish_doing_using_command import' -d Auto
|
|
|
186
191
|
complete -c doing -l before -f -r -n '__fish_doing_using_command import' -d Import\ entries\ older\ than\ date
|
|
187
192
|
complete -c doing -l case -f -r -n '__fish_doing_using_command import' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
188
193
|
complete -c doing -l from -s f -f -r -n '__fish_doing_using_command import' -d Date\ range\ to\ import
|
|
194
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command import' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
189
195
|
complete -c doing -l not -f -n '__fish_doing_using_command import' -d Import\ items\ that\ \*don\'t\*\ match\ search/tag/date\ filters
|
|
190
196
|
complete -c doing -l only_timed -f -n '__fish_doing_using_command import' -d Only\ import\ items\ with\ recorded\ time\ intervals
|
|
191
197
|
complete -c doing -l overlap -f -n '__fish_doing_using_command import' -d Allow\ entries\ that\ overlap\ existing\ times
|
|
@@ -198,6 +204,7 @@ complete -c doing -l exact -s x -f -n '__fish_doing_using_command import' -d Fo
|
|
|
198
204
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command last' -d Tag\ boolean
|
|
199
205
|
complete -c doing -l case -f -r -n '__fish_doing_using_command last' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
200
206
|
complete -c doing -l editor -s e -f -n '__fish_doing_using_command last' -d Edit\ entry\ with\ vim
|
|
207
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command last' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
201
208
|
complete -c doing -l not -f -n '__fish_doing_using_command last' -d Show\ items\ that\ \*don\'t\*\ match\ search\ string\ or\ tag\ filter
|
|
202
209
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command last' -d Specify\ a\ section
|
|
203
210
|
complete -c doing -l search -f -r -n '__fish_doing_using_command last' -d Search\ filter
|
|
@@ -211,6 +218,7 @@ complete -c doing -l count -s c -f -r -n '__fish_doing_using_command mark flag'
|
|
|
211
218
|
complete -c doing -l case -f -r -n '__fish_doing_using_command mark flag' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
212
219
|
complete -c doing -l date -s d -f -n '__fish_doing_using_command mark flag' -d Include\ current\ date/time\ with\ tag
|
|
213
220
|
complete -c doing -l force -f -n '__fish_doing_using_command mark flag' -d Don\'t\ ask\ permission\ to\ flag\ all\ entries\ when\ count\ is\ 0
|
|
221
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command mark flag' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
214
222
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command mark flag' -d Select\ item\(s\)\ to\ flag\ from\ a\ menu\ of\ matching\ entries
|
|
215
223
|
complete -c doing -l not -f -n '__fish_doing_using_command mark flag' -d Flag\ items\ that\ \*don\'t\*\ match\ search/tag/date\ filters
|
|
216
224
|
complete -c doing -l remove -s r -f -n '__fish_doing_using_command mark flag' -d Remove\ flag
|
|
@@ -227,6 +235,7 @@ complete -c doing -l section -s s -f -r -n '__fish_doing_using_command meanwhile
|
|
|
227
235
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command note' -d Boolean
|
|
228
236
|
complete -c doing -l case -f -r -n '__fish_doing_using_command note' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
229
237
|
complete -c doing -l editor -s e -f -n '__fish_doing_using_command note' -d Edit\ entry\ with\ vim
|
|
238
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command note' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
230
239
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command note' -d Select\ item\ for\ new\ note\ from\ a\ menu\ of\ matching\ entries
|
|
231
240
|
complete -c doing -l not -f -n '__fish_doing_using_command note' -d Add\ note\ to\ item\ that\ \*doesn\'t\*\ match\ search/tag\ filters
|
|
232
241
|
complete -c doing -l remove -s r -f -n '__fish_doing_using_command note' -d Replace/Remove\ last\ entry\'s\ note
|
|
@@ -255,6 +264,7 @@ complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command recent' -d S
|
|
|
255
264
|
complete -c doing -l totals -f -n '__fish_doing_using_command recent' -d Show\ intervals\ with\ totals\ at\ the\ end\ of\ output
|
|
256
265
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command reset begin' -d Boolean
|
|
257
266
|
complete -c doing -l case -f -r -n '__fish_doing_using_command reset begin' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
267
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command reset begin' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
258
268
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command reset begin' -d Select\ from\ a\ menu\ of\ matching\ entries
|
|
259
269
|
complete -c doing -l not -f -n '__fish_doing_using_command reset begin' -d Reset\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
|
|
260
270
|
complete -c doing -l resume -s r -f -n '__fish_doing_using_command reset begin' -d Resume\ entry
|
|
@@ -265,6 +275,7 @@ complete -c doing -l exact -s x -f -n '__fish_doing_using_command reset begin'
|
|
|
265
275
|
complete -c doing -l before -f -r -n '__fish_doing_using_command rotate' -d Rotate\ entries\ older\ than\ date
|
|
266
276
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command rotate' -d Tag\ boolean
|
|
267
277
|
complete -c doing -l case -f -r -n '__fish_doing_using_command rotate' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
278
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command rotate' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
268
279
|
complete -c doing -l keep -s k -f -r -n '__fish_doing_using_command rotate' -d How\ many\ items\ to\ keep\ in\ each\ section
|
|
269
280
|
complete -c doing -l not -f -n '__fish_doing_using_command rotate' -d Rotate\ items\ that\ \*don\'t\*\ match\ search\ string\ or\ tag\ filter
|
|
270
281
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command rotate' -d Section\ to\ rotate
|
|
@@ -298,6 +309,7 @@ complete -c doing -l before -f -r -n '__fish_doing_using_command show' -d View\
|
|
|
298
309
|
complete -c doing -l count -s c -f -r -n '__fish_doing_using_command show' -d Max\ count\ to\ show
|
|
299
310
|
complete -c doing -l case -f -r -n '__fish_doing_using_command show' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
300
311
|
complete -c doing -l from -s f -f -r -n '__fish_doing_using_command show' -d Date\ range\ to\ show
|
|
312
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command show' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
301
313
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command show' -d Select\ from\ a\ menu\ of\ matching\ entries\ to\ perform\ additional\ operations
|
|
302
314
|
complete -c doing -l not -f -n '__fish_doing_using_command show' -d Show\ items\ that\ \*don\'t\*\ match\ search/tag/date\ filters
|
|
303
315
|
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command show' -d Output\ to\ export\ format
|
|
@@ -321,6 +333,7 @@ complete -c doing -l count -s c -f -r -n '__fish_doing_using_command tag' -d How
|
|
|
321
333
|
complete -c doing -l case -f -r -n '__fish_doing_using_command tag' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
322
334
|
complete -c doing -l date -s d -f -n '__fish_doing_using_command tag' -d Include\ current\ date/time\ with\ tag
|
|
323
335
|
complete -c doing -l force -f -n '__fish_doing_using_command tag' -d Don\'t\ ask\ permission\ to\ tag\ all\ entries\ when\ count\ is\ 0
|
|
336
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command tag' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
324
337
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command tag' -d Select\ item\(s\)\ to\ tag\ from\ a\ menu\ of\ matching\ entries
|
|
325
338
|
complete -c doing -l not -f -n '__fish_doing_using_command tag' -d Tag\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
|
|
326
339
|
complete -c doing -l remove -s r -f -n '__fish_doing_using_command tag' -d Remove\ given\ tag\(s\)
|
|
@@ -346,6 +359,7 @@ complete -c doing -l before -f -r -n '__fish_doing_using_command view' -d View\
|
|
|
346
359
|
complete -c doing -l count -s c -f -r -n '__fish_doing_using_command view' -d Count\ to\ display
|
|
347
360
|
complete -c doing -l case -f -r -n '__fish_doing_using_command view' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
|
348
361
|
complete -c doing -l color -f -n '__fish_doing_using_command view' -d Include\ colors\ in\ output
|
|
362
|
+
complete -c doing -l fuzzy -f -n '__fish_doing_using_command view' -d Use\ alternative\ fuzzy\ matching\ for\ search\ string
|
|
349
363
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command view' -d Select\ from\ a\ menu\ of\ matching\ entries\ to\ perform\ additional\ operations
|
|
350
364
|
complete -c doing -l not -f -n '__fish_doing_using_command view' -d Show\ items\ that\ \*don\'t\*\ match\ search\ string
|
|
351
365
|
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command view' -d Output\ to\ export\ format
|
|
@@ -69,22 +69,28 @@ module Doing
|
|
|
69
69
|
|
|
70
70
|
output.sub!(/%section/, item.section) if item.section
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
output.
|
|
72
|
+
title_rx = /(?mi)%(?<width>-?\d+)?(?:(?<ichar>[ _t])(?<icount>\d+))?(?<prefix>.[ _t]?)?title(?<after>.*?)$/
|
|
73
|
+
title_color = Doing::Color.reset + output.match(/(?mi)^(.*?)(%.*?title)/)[1].last_color
|
|
74
|
+
|
|
75
|
+
title_offset = Doing::Color.uncolor(output).match(title_rx).begin(0)
|
|
76
|
+
|
|
77
|
+
output.sub!(title_rx) do
|
|
74
78
|
m = Regexp.last_match
|
|
75
|
-
|
|
79
|
+
|
|
80
|
+
after = m['after']
|
|
81
|
+
pad = m['width'].to_i
|
|
76
82
|
indent = ''
|
|
77
|
-
if m[
|
|
78
|
-
char = m[
|
|
79
|
-
indent = char * m[
|
|
83
|
+
if m['ichar']
|
|
84
|
+
char = m['ichar'] =~ /t/ ? "\t" : ' '
|
|
85
|
+
indent = char * m['icount'].to_i
|
|
80
86
|
end
|
|
81
|
-
|
|
87
|
+
prefix = m['prefix']
|
|
82
88
|
if opt[:wrap_width]&.positive? || pad.positive?
|
|
83
89
|
width = pad.positive? ? pad : opt[:wrap_width]
|
|
84
|
-
item.title.wrap(width, pad: pad, indent: indent, offset: title_offset, prefix:
|
|
90
|
+
item.title.wrap(width, pad: pad, indent: indent, offset: title_offset, prefix: prefix, color: title_color, after: after, reset: reset)
|
|
85
91
|
# flag + item.title.gsub(/(.{#{opt[:wrap_width]}})(?=\s+|\Z)/, "\\1\n ").sub(/\s*$/, '') + reset
|
|
86
92
|
else
|
|
87
|
-
format("%s%#{pad}s%s%s",
|
|
93
|
+
format("%s%s%#{pad}s%s%s", title_color, prefix, item.title.sub(/\s*$/, ''), reset, after)
|
|
88
94
|
end
|
|
89
95
|
end
|
|
90
96
|
|
data/lib/doing/string.rb
CHANGED
|
@@ -77,13 +77,15 @@ module Doing
|
|
|
77
77
|
##
|
|
78
78
|
def highlight_tags(color = 'yellow')
|
|
79
79
|
escapes = scan(/(\e\[[\d;]+m)[^\e]+@/)
|
|
80
|
-
|
|
80
|
+
color = color.split(' ') unless color.is_a?(Array)
|
|
81
|
+
tag_color = ''
|
|
82
|
+
color.each { |c| tag_color += Doing::Color.send(c) }
|
|
81
83
|
last_color = if !escapes.empty?
|
|
82
84
|
escapes[-1][0]
|
|
83
85
|
else
|
|
84
86
|
Doing::Color.default
|
|
85
87
|
end
|
|
86
|
-
gsub(/(\s|m)(@[^ ("']+)/, "\\1#{tag_color}\\2#{last_color}")
|
|
88
|
+
gsub(/(\s|m)(@[^ ("']+)/, "\\1#{tag_color}\\2#{Doing::Color.reset}#{last_color}")
|
|
87
89
|
end
|
|
88
90
|
|
|
89
91
|
##
|
|
@@ -159,19 +161,21 @@ module Doing
|
|
|
159
161
|
## @param offset [Integer] (Optional) The width to pad each subsequent line
|
|
160
162
|
## @param prefix [String] (Optional) A prefix to add to each line
|
|
161
163
|
##
|
|
162
|
-
def wrap(len, pad: 0, indent: ' ', offset: 0, prefix: '', after: '', reset: '')
|
|
164
|
+
def wrap(len, pad: 0, indent: ' ', offset: 0, prefix: '', color: '', after: '', reset: '')
|
|
165
|
+
last_color = after.last_color
|
|
163
166
|
note_rx = /(?i-m)(%(?:[io]d|(?:\^[\s\S])?(?:(?:[ _t]|[^a-z0-9])?\d+)?(?:[\s\S][ _t]?)?)?note)/
|
|
164
|
-
|
|
167
|
+
# Don't break inside of tag values
|
|
168
|
+
str = gsub(/@\S+\(.*?\)/) { |tag| tag.gsub(/\s/, '%%%%') }
|
|
165
169
|
words = str.split(/ /).map { |word| word.gsub(/%%%%/, ' ') }
|
|
166
170
|
out = []
|
|
167
171
|
line = []
|
|
168
172
|
words.each do |word|
|
|
169
|
-
if line.join(' ').length + word.length + 1 > len
|
|
173
|
+
if line.join(' ').uncolor.length + word.uncolor.length + 1 > len
|
|
170
174
|
out.push(line.join(' '))
|
|
171
175
|
line.clear
|
|
172
176
|
end
|
|
173
177
|
|
|
174
|
-
line << word
|
|
178
|
+
line << word.uncolor
|
|
175
179
|
end
|
|
176
180
|
out.push(line.join(' '))
|
|
177
181
|
note = ''
|
|
@@ -180,10 +184,11 @@ module Doing
|
|
|
180
184
|
''
|
|
181
185
|
end
|
|
182
186
|
|
|
183
|
-
out[0] = format("%-#{pad}s%s", out[0], after)
|
|
184
|
-
|
|
187
|
+
out[0] = format("%-#{pad}s%s%s", out[0], last_color, after)
|
|
188
|
+
|
|
189
|
+
left_pad = ' ' * offset
|
|
185
190
|
left_pad += indent
|
|
186
|
-
out.map { |l| "#{left_pad}#{
|
|
191
|
+
out.map { |l| "#{left_pad}#{color}#{l}#{last_color}" }.join("\n").strip + last_color + " #{note}".chomp
|
|
187
192
|
end
|
|
188
193
|
|
|
189
194
|
##
|
|
@@ -368,6 +373,14 @@ module Doing
|
|
|
368
373
|
title
|
|
369
374
|
end
|
|
370
375
|
|
|
376
|
+
# Returns the last escape sequence from a string
|
|
377
|
+
#
|
|
378
|
+
# @param string The string to examine
|
|
379
|
+
#
|
|
380
|
+
def last_color
|
|
381
|
+
scan(/\e\[[\d;]+m/).join('')
|
|
382
|
+
end
|
|
383
|
+
|
|
371
384
|
##
|
|
372
385
|
## Turn raw urls into HTML links
|
|
373
386
|
##
|
data/lib/doing/version.rb
CHANGED