doing 1.0.90 → 2.0.2.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHORS +19 -0
- data/CHANGELOG.md +590 -0
- data/COMMANDS.md +1181 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +110 -0
- data/LICENSE +23 -0
- data/README.md +14 -697
- data/Rakefile +79 -0
- data/_config.yml +1 -0
- data/bin/doing +1037 -481
- data/doing.fish +278 -0
- data/doing.gemspec +34 -0
- data/doing.rdoc +1759 -0
- data/example_plugin.rb +209 -0
- data/generate_completions.sh +4 -0
- data/img/doing-colors.jpg +0 -0
- data/img/doing-printf-wrap-800.jpg +0 -0
- data/img/doing-show-note-formatting-800.jpg +0 -0
- data/lib/completion/_doing.zsh +151 -0
- data/lib/completion/doing.bash +416 -0
- data/lib/completion/doing.fish +278 -0
- data/lib/doing/array.rb +8 -0
- data/lib/doing/cli_status.rb +66 -0
- data/lib/doing/colors.rb +136 -0
- data/lib/doing/configuration.rb +310 -0
- data/lib/doing/errors.rb +102 -0
- data/lib/doing/hash.rb +31 -0
- data/lib/doing/hooks.rb +59 -0
- data/lib/doing/item.rb +155 -0
- data/lib/doing/log_adapter.rb +342 -0
- data/lib/doing/markdown_document_listener.rb +174 -0
- data/lib/doing/note.rb +59 -0
- data/lib/doing/pager.rb +95 -0
- data/lib/doing/plugin_manager.rb +208 -0
- data/lib/doing/plugins/export/csv_export.rb +48 -0
- data/lib/doing/plugins/export/html_export.rb +83 -0
- data/lib/doing/plugins/export/json_export.rb +140 -0
- data/lib/doing/plugins/export/markdown_export.rb +85 -0
- data/lib/doing/plugins/export/taskpaper_export.rb +34 -0
- data/lib/doing/plugins/export/template_export.rb +141 -0
- data/lib/doing/plugins/import/cal_to_json.scpt +0 -0
- data/lib/doing/plugins/import/calendar_import.rb +76 -0
- data/lib/doing/plugins/import/doing_import.rb +144 -0
- data/lib/doing/plugins/import/timing_import.rb +78 -0
- data/lib/doing/string.rb +346 -0
- data/lib/doing/symbol.rb +16 -0
- data/lib/doing/time.rb +18 -0
- data/lib/doing/util.rb +186 -0
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +1838 -2266
- data/lib/doing/wwidfile.rb +117 -0
- data/lib/doing.rb +43 -2
- data/lib/examples/commands/wiki.rb +80 -0
- data/lib/examples/plugins/hooks.rb +22 -0
- data/lib/examples/plugins/say_export.rb +202 -0
- data/lib/examples/plugins/templates/wiki.css +169 -0
- data/lib/examples/plugins/templates/wiki.haml +27 -0
- data/lib/examples/plugins/templates/wiki_index.haml +18 -0
- data/lib/examples/plugins/wiki_export.rb +87 -0
- data/lib/templates/doing-markdown.erb +5 -0
- data/man/doing.1 +964 -0
- data/man/doing.1.html +711 -0
- data/man/doing.1.ronn +600 -0
- data/package-lock.json +3 -0
- data/rdoc_to_mmd.rb +42 -0
- data/rdocfixer.rb +13 -0
- data/scripts/generate_bash_completions.rb +210 -0
- data/scripts/generate_fish_completions.rb +201 -0
- data/scripts/generate_zsh_completions.rb +164 -0
- metadata +82 -6
- data/lib/doing/helpers.rb +0 -121
@@ -0,0 +1,278 @@
|
|
1
|
+
function __fish_doing_needs_command
|
2
|
+
# Figure out if the current invocation already has a command.
|
3
|
+
|
4
|
+
set -l opts h-help config_file= f-doing_file= n-notes v-version stdout d-debug default x-noauto
|
5
|
+
set cmd (commandline -opc)
|
6
|
+
set -e cmd[1]
|
7
|
+
argparse -s $opts -- $cmd 2>/dev/null
|
8
|
+
or return 0
|
9
|
+
# These flags function as commands, effectively.
|
10
|
+
if set -q argv[1]
|
11
|
+
# Also print the command, so this can be used to figure out what it is.
|
12
|
+
echo $argv[1]
|
13
|
+
return 1
|
14
|
+
end
|
15
|
+
return 0
|
16
|
+
end
|
17
|
+
|
18
|
+
function __fish_doing_using_command
|
19
|
+
set -l cmd (__fish_doing_needs_command)
|
20
|
+
test -z "$cmd"
|
21
|
+
and return 1
|
22
|
+
contains -- $cmd $argv
|
23
|
+
and return 0
|
24
|
+
end
|
25
|
+
|
26
|
+
function __fish_doing_complete_sections
|
27
|
+
doing sections -c
|
28
|
+
end
|
29
|
+
|
30
|
+
function __fish_doing_complete_views
|
31
|
+
doing views -c
|
32
|
+
end
|
33
|
+
|
34
|
+
function __fish_doing_subcommands
|
35
|
+
doing help -c
|
36
|
+
end
|
37
|
+
|
38
|
+
function __fish_doing_export_plugins
|
39
|
+
doing plugins --type export -c
|
40
|
+
end
|
41
|
+
|
42
|
+
function __fish_doing_import_plugins
|
43
|
+
doing plugins --type import -c
|
44
|
+
end
|
45
|
+
|
46
|
+
function __fish_doing_complete_templates
|
47
|
+
doing template -c
|
48
|
+
end
|
49
|
+
|
50
|
+
complete -c doing -f
|
51
|
+
complete -xc doing -n '__fish_doing_needs_command' -a '(__fish_doing_subcommands)'
|
52
|
+
|
53
|
+
complete -f -c doing -n '__fish_doing_using_command show' -a '(__fish_doing_complete_sections)'
|
54
|
+
complete -f -c doing -n '__fish_doing_using_command view' -a '(__fish_doing_complete_views)'
|
55
|
+
complete -f -c doing -n '__fish_doing_using_command template' -a '(__fish_doing_complete_templates)'
|
56
|
+
complete -f -c doing -s t -l type -x -n '__fish_doing_using_command import' -a '(__fish_doing_import_plugins)'
|
57
|
+
|
58
|
+
|
59
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'add_section' -d Add\ a\ new\ section\ to\ the\ \"doing\"\ file
|
60
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'again resume' -d Repeat\ last\ entry\ as\ new\ entry
|
61
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'archive' -d Move\ entries\ between\ sections
|
62
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'cancel' -d End\ last\ X\ entries\ with\ no\ time\ tracked
|
63
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'choose' -d Select\ a\ section\ to\ display\ from\ a\ menu
|
64
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'colors' -d List\ available\ color\ variables\ for\ configuration\ templates\ and\ views
|
65
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'config' -d Edit\ the\ configuration\ file
|
66
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'done did' -d Add\ a\ completed\ item\ with\ @done\(date\)
|
67
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'finish' -d Mark\ last\ X\ entries\ as\ @done
|
68
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'grep search' -d Search\ for\ entries
|
69
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'help' -d Shows\ a\ list\ of\ commands\ or\ help\ for\ one\ command
|
70
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'import' -d Import\ entries\ from\ an\ external\ source
|
71
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'last' -d Show\ the\ last\ entry
|
72
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'later' -d Add\ an\ item\ to\ the\ Later\ section
|
73
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'mark flag' -d Mark\ last\ entry\ as\ highlighted
|
74
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'meanwhile' -d Finish\ any\ running\ @meanwhile\ tasks\ and\ optionally\ create\ a\ new\ one
|
75
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'note' -d Add\ a\ note\ to\ the\ last\ entry
|
76
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'now next' -d Add\ an\ entry
|
77
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'on' -d List\ entries\ for\ a\ date
|
78
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'open' -d Open\ the\ \"doing\"\ file\ in\ an\ editor
|
79
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'plugins' -d List\ installed\ plugins
|
80
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'recent' -d List\ recent\ entries
|
81
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'rotate' -d Move\ entries\ to\ archive\ file
|
82
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'sections' -d List\ sections
|
83
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'select' -d Display\ an\ interactive\ menu\ to\ perform\ operations
|
84
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'show' -d List\ all\ entries
|
85
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'since' -d List\ entries\ since\ a\ date
|
86
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'tag' -d Add\ tag\(s\)\ to\ last\ entry
|
87
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'template' -d Output\ HTML
|
88
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'today' -d List\ entries\ from\ today
|
89
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'undo' -d Undo\ the\ last\ change\ to\ the\ doing_file
|
90
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'view' -d Display\ a\ user-created\ view
|
91
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'views' -d List\ available\ custom\ views
|
92
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'yesterday' -d List\ entries\ from\ yesterday
|
93
|
+
complete -c doing -l bool -f -r -n '__fish_doing_using_command again resume' -d Boolean\ used\ to\ combine\ multiple\ tags
|
94
|
+
complete -c doing -l editor -s e -f -n '__fish_doing_using_command again resume' -d Edit\ duplicated\ entry\ with\ before\ adding
|
95
|
+
complete -c doing -l in -f -r -n '__fish_doing_using_command again resume' -d Add\ new\ entry\ to\ section
|
96
|
+
complete -c doing -l note -s n -f -r -n '__fish_doing_using_command again resume' -d Note
|
97
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command again resume' -d Get\ last\ entry\ from\ a\ specific\ section
|
98
|
+
complete -c doing -l search -f -r -n '__fish_doing_using_command again resume' -d Repeat\ last\ entry\ matching\ search
|
99
|
+
complete -c doing -l tag -f -r -n '__fish_doing_using_command again resume' -d Repeat\ last\ entry\ matching\ tags
|
100
|
+
complete -c doing -l before -f -r -n '__fish_doing_using_command archive' -d Archive\ entries\ older\ than\ date
|
101
|
+
complete -c doing -l bool -f -r -n '__fish_doing_using_command archive' -d Tag\ boolean
|
102
|
+
complete -c doing -l keep -s k -f -r -n '__fish_doing_using_command archive' -d How\ many\ items\ to\ keep
|
103
|
+
complete -c doing -l label -f -n '__fish_doing_using_command archive' -d Label\ moved\ items\ with\ @from\(SECTION_NAME\)
|
104
|
+
complete -c doing -l search -f -r -n '__fish_doing_using_command archive' -d Search\ filter
|
105
|
+
complete -c doing -l to -s t -f -r -n '__fish_doing_using_command archive' -d Move\ entries\ to
|
106
|
+
complete -c doing -l tag -f -r -n '__fish_doing_using_command archive' -d Tag\ filter
|
107
|
+
complete -c doing -l archive -s a -f -n '__fish_doing_using_command cancel' -d Archive\ entries
|
108
|
+
complete -c doing -l bool -f -r -n '__fish_doing_using_command cancel' -d Boolean
|
109
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command cancel' -d Section
|
110
|
+
complete -c doing -l tag -f -r -n '__fish_doing_using_command cancel' -d Cancel\ the\ last\ X\ entries\ containing\ TAG
|
111
|
+
complete -c doing -l unfinished -s u -f -n '__fish_doing_using_command cancel' -d Cancel\ last\ entry
|
112
|
+
complete -c doing -l editor -s e -f -r -n '__fish_doing_using_command config' -d Editor\ to\ use
|
113
|
+
complete -c doing -l update -s u -f -n '__fish_doing_using_command config' -d Update\ config\ file\ with\ missing\ configuration\ options
|
114
|
+
complete -c doing -l archive -s a -f -n '__fish_doing_using_command done did' -d Immediately\ archive\ the\ entry
|
115
|
+
complete -c doing -l at -f -r -n '__fish_doing_using_command done did' -d Set\ finish\ date\ to\ specific\ date/time
|
116
|
+
complete -c doing -l back -s b -f -r -n '__fish_doing_using_command done did' -d Backdate\ start\ date\ by\ interval\ \[4pm\|20m\|2h\|yesterday\ noon\]
|
117
|
+
complete -c doing -l date -f -n '__fish_doing_using_command done did' -d Include\ date
|
118
|
+
complete -c doing -l editor -s e -f -n '__fish_doing_using_command done did' -d Edit\ entry\ with
|
119
|
+
complete -c doing -l remove -s r -f -n '__fish_doing_using_command done did' -d Remove\ @done\ tag
|
120
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command done did' -d Section
|
121
|
+
complete -c doing -l took -s t -f -r -n '__fish_doing_using_command done did' -d Set\ completion\ date\ to\ start\ date\ plus\ interval
|
122
|
+
complete -c doing -l archive -s a -f -n '__fish_doing_using_command finish' -d Archive\ entries
|
123
|
+
complete -c doing -l at -f -r -n '__fish_doing_using_command finish' -d Set\ finish\ date\ to\ specific\ date/time
|
124
|
+
complete -c doing -l auto -f -n '__fish_doing_using_command finish' -d Auto-generate\ finish\ dates\ from\ next\ entry\'s\ start\ time
|
125
|
+
complete -c doing -l back -s b -f -r -n '__fish_doing_using_command finish' -d Backdate\ completed\ date\ to\ date\ string\ \[4pm\|20m\|2h\|yesterday\ noon\]
|
126
|
+
complete -c doing -l bool -f -r -n '__fish_doing_using_command finish' -d Boolean
|
127
|
+
complete -c doing -l date -f -n '__fish_doing_using_command finish' -d Include\ date
|
128
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command finish' -d Section
|
129
|
+
complete -c doing -l search -f -r -n '__fish_doing_using_command finish' -d Finish\ the\ last\ X\ entries\ matching\ search\ filter
|
130
|
+
complete -c doing -l took -s t -f -r -n '__fish_doing_using_command finish' -d Set\ the\ completed\ date\ to\ the\ start\ date\ plus\ XX\[hmd\]
|
131
|
+
complete -c doing -l tag -f -r -n '__fish_doing_using_command finish' -d Finish\ the\ last\ X\ entries\ containing\ TAG
|
132
|
+
complete -c doing -l unfinished -s u -f -n '__fish_doing_using_command finish' -d Finish\ last\ entry
|
133
|
+
complete -c doing -l after -f -r -n '__fish_doing_using_command grep search' -d Constrain\ search\ to\ entries\ newer\ than\ date
|
134
|
+
complete -c doing -l before -f -r -n '__fish_doing_using_command grep search' -d Constrain\ search\ to\ entries\ older\ than\ date
|
135
|
+
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
|
136
|
+
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command grep search' -d Output\ to\ export\ format
|
137
|
+
complete -c doing -l only_timed -f -n '__fish_doing_using_command grep search' -d Only\ show\ items\ with\ recorded\ time\ intervals
|
138
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command grep search' -d Section
|
139
|
+
complete -c doing -l times -s t -f -n '__fish_doing_using_command grep search' -d Show\ time\ intervals\ on\ @done\ tasks
|
140
|
+
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command grep search' -d Sort\ tags\ by
|
141
|
+
complete -c doing -l totals -f -n '__fish_doing_using_command grep search' -d Show\ intervals\ with\ totals\ at\ the\ end\ of\ output
|
142
|
+
complete -c doing -F -n '__fish_doing_using_command import'
|
143
|
+
complete -c doing -l after -f -r -n '__fish_doing_using_command import' -d Import\ entries\ newer\ than\ date
|
144
|
+
complete -c doing -l autotag -f -n '__fish_doing_using_command import' -d Autotag\ entries
|
145
|
+
complete -c doing -l before -f -r -n '__fish_doing_using_command import' -d Import\ entries\ older\ than\ date
|
146
|
+
complete -c doing -l from -s f -f -r -n '__fish_doing_using_command import' -d Date\ range\ to\ import
|
147
|
+
complete -c doing -l only_timed -f -n '__fish_doing_using_command import' -d Only\ import\ items\ with\ recorded\ time\ intervals
|
148
|
+
complete -c doing -l overlap -f -n '__fish_doing_using_command import' -d Allow\ entries\ that\ overlap\ existing\ times
|
149
|
+
complete -c doing -l prefix -f -r -n '__fish_doing_using_command import' -d Prefix\ entries\ with
|
150
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command import' -d Target\ section
|
151
|
+
complete -c doing -l search -f -r -n '__fish_doing_using_command import' -d Only\ import\ items\ matching\ search
|
152
|
+
complete -c doing -l tag -f -r -n '__fish_doing_using_command import' -d Tag\ all\ imported\ entries
|
153
|
+
complete -c doing -l type -f -r -n '__fish_doing_using_command import' -d Import\ type
|
154
|
+
complete -c doing -l bool -f -r -n '__fish_doing_using_command last' -d Tag\ boolean
|
155
|
+
complete -c doing -l editor -s e -f -n '__fish_doing_using_command last' -d Edit\ entry\ with
|
156
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command last' -d Specify\ a\ section
|
157
|
+
complete -c doing -l search -f -r -n '__fish_doing_using_command last' -d Search\ filter
|
158
|
+
complete -c doing -l tag -f -r -n '__fish_doing_using_command last' -d Tag\ filter
|
159
|
+
complete -c doing -l back -s b -f -r -n '__fish_doing_using_command later' -d Backdate\ start\ time\ to\ date\ string\ \[4pm\|20m\|2h\|yesterday\ noon\]
|
160
|
+
complete -c doing -l editor -s e -f -n '__fish_doing_using_command later' -d Edit\ entry\ with
|
161
|
+
complete -c doing -l note -s n -f -r -n '__fish_doing_using_command later' -d Note
|
162
|
+
complete -c doing -l remove -s r -f -n '__fish_doing_using_command mark flag' -d Remove\ mark
|
163
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command mark flag' -d Section
|
164
|
+
complete -c doing -l unfinished -s u -f -n '__fish_doing_using_command mark flag' -d Mark\ last\ entry\ not\ marked\ @done
|
165
|
+
complete -c doing -l archive -s a -f -n '__fish_doing_using_command meanwhile' -d Archive\ previous\ @meanwhile\ entry
|
166
|
+
complete -c doing -l back -s b -f -r -n '__fish_doing_using_command meanwhile' -d Backdate\ start\ date\ for\ new\ entry\ to\ date\ string\ \[4pm\|20m\|2h\|yesterday\ noon\]
|
167
|
+
complete -c doing -l editor -s e -f -n '__fish_doing_using_command meanwhile' -d Edit\ entry\ with
|
168
|
+
complete -c doing -l note -s n -f -r -n '__fish_doing_using_command meanwhile' -d Note
|
169
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command meanwhile' -d Section
|
170
|
+
complete -c doing -l editor -s e -f -n '__fish_doing_using_command note' -d Edit\ entry\ with
|
171
|
+
complete -c doing -l remove -s r -f -n '__fish_doing_using_command note' -d Replace/Remove\ last\ entry\'s\ note
|
172
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command note' -d Section
|
173
|
+
complete -c doing -l back -s b -f -r -n '__fish_doing_using_command now next' -d Backdate\ start\ time\ \[4pm\|20m\|2h\|yesterday\ noon\]
|
174
|
+
complete -c doing -l editor -s e -f -n '__fish_doing_using_command now next' -d Edit\ entry\ with
|
175
|
+
complete -c doing -l finish_last -s f -f -n '__fish_doing_using_command now next' -d Timed\ entry
|
176
|
+
complete -c doing -l note -s n -f -r -n '__fish_doing_using_command now next' -d Note
|
177
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command now next' -d Section
|
178
|
+
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command on' -d Output\ to\ export\ format
|
179
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command on' -d Section
|
180
|
+
complete -c doing -l times -s t -f -n '__fish_doing_using_command on' -d Show\ time\ intervals\ on\ @done\ tasks
|
181
|
+
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command on' -d Sort\ tags\ by
|
182
|
+
complete -c doing -l totals -f -n '__fish_doing_using_command on' -d Show\ time\ totals\ at\ the\ end\ of\ output
|
183
|
+
complete -c doing -l app -s a -f -r -n '__fish_doing_using_command open' -d Open\ with\ app\ name
|
184
|
+
complete -c doing -l bundle_id -s b -f -r -n '__fish_doing_using_command open' -d Open\ with\ app\ bundle\ id
|
185
|
+
complete -c doing -l editor -s e -f -n '__fish_doing_using_command open' -d Open\ with\ \$EDITOR
|
186
|
+
complete -c doing -l column -s c -f -n '__fish_doing_using_command plugins' -d List\ in\ single\ column\ for\ completion
|
187
|
+
complete -c doing -l type -s t -f -r -n '__fish_doing_using_command plugins' -d List\ plugins\ of\ type
|
188
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command recent' -d Section
|
189
|
+
complete -c doing -l times -s t -f -n '__fish_doing_using_command recent' -d Show\ time\ intervals\ on\ @done\ tasks
|
190
|
+
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command recent' -d Sort\ tags\ by
|
191
|
+
complete -c doing -l totals -f -n '__fish_doing_using_command recent' -d Show\ intervals\ with\ totals\ at\ the\ end\ of\ output
|
192
|
+
complete -c doing -l before -f -r -n '__fish_doing_using_command rotate' -d Rotate\ entries\ older\ than\ date
|
193
|
+
complete -c doing -l bool -f -r -n '__fish_doing_using_command rotate' -d Tag\ boolean
|
194
|
+
complete -c doing -l keep -s k -f -r -n '__fish_doing_using_command rotate' -d How\ many\ items\ to\ keep\ in\ each\ section
|
195
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command rotate' -d Section\ to\ rotate
|
196
|
+
complete -c doing -l search -f -r -n '__fish_doing_using_command rotate' -d Search\ filter
|
197
|
+
complete -c doing -l tag -f -r -n '__fish_doing_using_command rotate' -d Tag\ filter
|
198
|
+
complete -c doing -l column -s c -f -n '__fish_doing_using_command sections' -d List\ in\ single\ column
|
199
|
+
complete -c doing -l archive -s a -f -n '__fish_doing_using_command select' -d Archive\ selected\ items
|
200
|
+
complete -c doing -l cancel -s c -f -n '__fish_doing_using_command select' -d Cancel\ selected\ items
|
201
|
+
complete -c doing -l delete -s d -f -n '__fish_doing_using_command select' -d Delete\ selected\ items
|
202
|
+
complete -c doing -l editor -s e -f -n '__fish_doing_using_command select' -d Edit\ selected\ item\(s\)
|
203
|
+
complete -c doing -l finish -s f -f -n '__fish_doing_using_command select' -d Add\ @done\ with\ current\ time\ to\ selected\ item\(s\)
|
204
|
+
complete -c doing -l flag -f -n '__fish_doing_using_command select' -d Add\ flag\ to\ selected\ item\(s\)
|
205
|
+
complete -c doing -l force -f -n '__fish_doing_using_command select' -d Perform\ action\ without\ confirmation
|
206
|
+
complete -c doing -l move -s m -f -r -n '__fish_doing_using_command select' -d Move\ selected\ items\ to\ section
|
207
|
+
complete -c doing -l menu -f -n '__fish_doing_using_command select' -d Use\ --no-menu\ to\ skip\ the\ interactive\ menu
|
208
|
+
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command select' -d Output\ entries\ to\ format
|
209
|
+
complete -c doing -l query -s q -f -r -n '__fish_doing_using_command select' -d Initial\ search\ query\ for\ filtering
|
210
|
+
complete -c doing -l remove -s r -f -n '__fish_doing_using_command select' -d Reverse\ -c
|
211
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command select' -d Select\ from\ a\ specific\ section
|
212
|
+
complete -c doing -l save_to -f -r -n '__fish_doing_using_command select' -d Save\ selected\ entries\ to\ file\ using\ --output\ format
|
213
|
+
complete -c doing -l tag -s t -f -r -n '__fish_doing_using_command select' -d Tag\ selected\ entries
|
214
|
+
complete -c doing -l age -s a -f -r -n '__fish_doing_using_command show' -d Age
|
215
|
+
complete -c doing -l after -f -r -n '__fish_doing_using_command show' -d View\ entries\ newer\ than\ date
|
216
|
+
complete -c doing -l bool -s b -f -r -n '__fish_doing_using_command show' -d Tag\ boolean
|
217
|
+
complete -c doing -l before -f -r -n '__fish_doing_using_command show' -d View\ entries\ older\ than\ date
|
218
|
+
complete -c doing -l count -s c -f -r -n '__fish_doing_using_command show' -d Max\ count\ to\ show
|
219
|
+
complete -c doing -l from -s f -f -r -n '__fish_doing_using_command show' -d Date\ range\ to\ show
|
220
|
+
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command show' -d Output\ to\ export\ format
|
221
|
+
complete -c doing -l only_timed -f -n '__fish_doing_using_command show' -d Only\ show\ items\ with\ recorded\ time\ intervals
|
222
|
+
complete -c doing -l sort -s s -f -r -n '__fish_doing_using_command show' -d Sort\ order
|
223
|
+
complete -c doing -l search -f -r -n '__fish_doing_using_command show' -d Search\ filter
|
224
|
+
complete -c doing -l times -s t -f -n '__fish_doing_using_command show' -d Show\ time\ intervals\ on\ @done\ tasks
|
225
|
+
complete -c doing -l tag -f -r -n '__fish_doing_using_command show' -d Tag\ filter
|
226
|
+
complete -c doing -l tag_order -f -r -n '__fish_doing_using_command show' -d Tag\ sort\ direction
|
227
|
+
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command show' -d Sort\ tags\ by
|
228
|
+
complete -c doing -l totals -f -n '__fish_doing_using_command show' -d Show\ intervals\ with\ totals\ at\ the\ end\ of\ output
|
229
|
+
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command since' -d Output\ to\ export\ format
|
230
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command since' -d Section
|
231
|
+
complete -c doing -l times -s t -f -n '__fish_doing_using_command since' -d Show\ time\ intervals\ on\ @done\ tasks
|
232
|
+
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command since' -d Sort\ tags\ by
|
233
|
+
complete -c doing -l totals -f -n '__fish_doing_using_command since' -d Show\ time\ totals\ at\ the\ end\ of\ output
|
234
|
+
complete -c doing -l autotag -s a -f -n '__fish_doing_using_command tag' -d Autotag\ entries\ based\ on\ autotag\ configuration\ in\ \~/
|
235
|
+
complete -c doing -l bool -f -r -n '__fish_doing_using_command tag' -d Boolean
|
236
|
+
complete -c doing -l count -s c -f -r -n '__fish_doing_using_command tag' -d How\ many\ recent\ entries\ to\ tag
|
237
|
+
complete -c doing -l date -s d -f -n '__fish_doing_using_command tag' -d Include\ current\ date/time\ with\ tag
|
238
|
+
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
|
239
|
+
complete -c doing -l remove -s r -f -n '__fish_doing_using_command tag' -d Remove\ given\ tag\(s\)
|
240
|
+
complete -c doing -l regex -f -n '__fish_doing_using_command tag' -d Interpret\ tag\ string\ as\ regular\ expression
|
241
|
+
complete -c doing -l rename -f -r -n '__fish_doing_using_command tag' -d Replace\ existing\ tag\ with\ tag\ argument
|
242
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command tag' -d Section
|
243
|
+
complete -c doing -l search -f -r -n '__fish_doing_using_command tag' -d Tag\ entries\ matching\ search\ filter
|
244
|
+
complete -c doing -l tag -f -r -n '__fish_doing_using_command tag' -d Tag\ the\ last\ X\ entries\ containing\ TAG
|
245
|
+
complete -c doing -l unfinished -s u -f -n '__fish_doing_using_command tag' -d Tag\ last\ entry
|
246
|
+
complete -c doing -l list -s l -f -n '__fish_doing_using_command template' -d List\ all\ available\ templates
|
247
|
+
complete -c doing -l after -f -r -n '__fish_doing_using_command today' -d View\ entries\ after\ specified\ time
|
248
|
+
complete -c doing -l before -f -r -n '__fish_doing_using_command today' -d View\ entries\ before\ specified\ time
|
249
|
+
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command today' -d Output\ to\ export\ format
|
250
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command today' -d Specify\ a\ section
|
251
|
+
complete -c doing -l times -s t -f -n '__fish_doing_using_command today' -d Show\ time\ intervals\ on\ @done\ tasks
|
252
|
+
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command today' -d Sort\ tags\ by
|
253
|
+
complete -c doing -l totals -f -n '__fish_doing_using_command today' -d Show\ time\ totals\ at\ the\ end\ of\ output
|
254
|
+
complete -c doing -l file -s f -f -r -n '__fish_doing_using_command undo' -d Specify\ alternate\ doing\ file
|
255
|
+
complete -c doing -l after -f -r -n '__fish_doing_using_command view' -d View\ entries\ newer\ than\ date
|
256
|
+
complete -c doing -l bool -s b -f -r -n '__fish_doing_using_command view' -d Tag\ boolean
|
257
|
+
complete -c doing -l before -f -r -n '__fish_doing_using_command view' -d View\ entries\ older\ than\ date
|
258
|
+
complete -c doing -l count -s c -f -r -n '__fish_doing_using_command view' -d Count\ to\ display
|
259
|
+
complete -c doing -l color -f -n '__fish_doing_using_command view' -d Include\ colors\ in\ output
|
260
|
+
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command view' -d Output\ to\ export\ format
|
261
|
+
complete -c doing -l only_timed -f -n '__fish_doing_using_command view' -d Only\ show\ items\ with\ recorded\ time\ intervals
|
262
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command view' -d Section
|
263
|
+
complete -c doing -l search -f -r -n '__fish_doing_using_command view' -d Search\ filter
|
264
|
+
complete -c doing -l times -s t -f -n '__fish_doing_using_command view' -d Show\ time\ intervals\ on\ @done\ tasks
|
265
|
+
complete -c doing -l tag -f -r -n '__fish_doing_using_command view' -d Tag\ filter
|
266
|
+
complete -c doing -l tag_order -f -r -n '__fish_doing_using_command view' -d Tag\ sort\ direction
|
267
|
+
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command view' -d Sort\ tags\ by
|
268
|
+
complete -c doing -l totals -f -n '__fish_doing_using_command view' -d Show\ intervals\ with\ totals\ at\ the\ end\ of\ output
|
269
|
+
complete -c doing -l column -s c -f -n '__fish_doing_using_command views' -d List\ in\ single\ column
|
270
|
+
complete -c doing -l after -f -r -n '__fish_doing_using_command yesterday' -d View\ entries\ after\ specified\ time
|
271
|
+
complete -c doing -l before -f -r -n '__fish_doing_using_command yesterday' -d View\ entries\ before\ specified\ time
|
272
|
+
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command yesterday' -d Output\ to\ export\ format
|
273
|
+
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command yesterday' -d Specify\ a\ section
|
274
|
+
complete -c doing -l times -s t -f -n '__fish_doing_using_command yesterday' -d Show\ time\ intervals\ on\ @done\ tasks
|
275
|
+
complete -c doing -l tag_order -f -r -n '__fish_doing_using_command yesterday' -d Tag\ sort\ direction
|
276
|
+
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command yesterday' -d Sort\ tags\ by
|
277
|
+
complete -c doing -l totals -f -n '__fish_doing_using_command yesterday' -d Show\ time\ totals\ at\ the\ end\ of\ output
|
278
|
+
complete -f -c doing -s o -l output -x -n '__fish_doing_using_command grep search on select show since today view yesterday' -a '(__fish_doing_export_plugins)'
|
data/lib/doing/array.rb
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
module Status
|
2
|
+
def cols
|
3
|
+
@cols ||= `tput cols`.strip.to_i
|
4
|
+
end
|
5
|
+
|
6
|
+
def progress(msg, idx, total, tail = [])
|
7
|
+
status_width = format("> %s [%#{total.to_s.length}d/%d]: ", msg, 0, total).length
|
8
|
+
max_width = cols - status_width
|
9
|
+
if tail.is_a? Array
|
10
|
+
tail.shift while tail.join(', ').length + 3 > max_width
|
11
|
+
tail = tail.join(', ')
|
12
|
+
end
|
13
|
+
tail.ltrunc!(max_width)
|
14
|
+
$stderr.print format("#{esc['kill']}#{esc['boldyellow']}> #{esc['boldgreen']}%s #{esc['white']}[#{esc['boldwhite']}%#{@commands.count.to_s.length}d#{esc['boldblack']}/#{esc['boldyellow']}%d#{esc['white']}]: #{esc['boldcyan']}%s#{esc['default']}\r", msg, idx, total, tail)
|
15
|
+
end
|
16
|
+
|
17
|
+
def status(msg, reset: true)
|
18
|
+
$stderr.print format("#{esc['kill']}#{esc['boldyellow']}> #{esc['whiteboard']}%s#{esc['default']}%s", msg, reset ? "\r" : "\n")
|
19
|
+
end
|
20
|
+
|
21
|
+
def esc
|
22
|
+
e = {}
|
23
|
+
e['kill'] = "\033[2K"
|
24
|
+
e['reset'] = "\033[A\033[2K"
|
25
|
+
e['black'] = "\033[0;0;30m"
|
26
|
+
e['red'] = "\033[0;0;31m"
|
27
|
+
e['green'] = "\033[0;0;32m"
|
28
|
+
e['yellow'] = "\033[0;0;33m"
|
29
|
+
e['blue'] = "\033[0;0;34m"
|
30
|
+
e['magenta'] = "\033[0;0;35m"
|
31
|
+
e['cyan'] = "\033[0;0;36m"
|
32
|
+
e['white'] = "\033[0;0;37m"
|
33
|
+
e['bgblack'] = "\033[40m"
|
34
|
+
e['bgred'] = "\033[41m"
|
35
|
+
e['bggreen'] = "\033[42m"
|
36
|
+
e['bgyellow'] = "\033[43m"
|
37
|
+
e['bgblue'] = "\033[44m"
|
38
|
+
e['bgmagenta'] = "\033[45m"
|
39
|
+
e['bgcyan'] = "\033[46m"
|
40
|
+
e['bgwhite'] = "\033[47m"
|
41
|
+
e['boldblack'] = "\033[1;30m"
|
42
|
+
e['boldred'] = "\033[1;31m"
|
43
|
+
e['boldgreen'] = "\033[0;1;32m"
|
44
|
+
e['boldyellow'] = "\033[0;1;33m"
|
45
|
+
e['boldblue'] = "\033[0;1;34m"
|
46
|
+
e['boldmagenta'] = "\033[0;1;35m"
|
47
|
+
e['boldcyan'] = "\033[0;1;36m"
|
48
|
+
e['boldwhite'] = "\033[0;1;37m"
|
49
|
+
e['boldbgblack'] = "\033[1;40m"
|
50
|
+
e['boldbgred'] = "\033[1;41m"
|
51
|
+
e['boldbggreen'] = "\033[1;42m"
|
52
|
+
e['boldbgyellow'] = "\033[1;43m"
|
53
|
+
e['boldbgblue'] = "\033[1;44m"
|
54
|
+
e['boldbgmagenta'] = "\033[1;45m"
|
55
|
+
e['boldbgcyan'] = "\033[1;46m"
|
56
|
+
e['boldbgwhite'] = "\033[1;47m"
|
57
|
+
e['softpurple'] = "\033[0;35;40m"
|
58
|
+
e['hotpants'] = "\033[7;34;40m"
|
59
|
+
e['knightrider'] = "\033[7;30;40m"
|
60
|
+
e['flamingo'] = "\033[7;31;47m"
|
61
|
+
e['yeller'] = "\033[1;37;43m"
|
62
|
+
e['whiteboard'] = "\033[1;30;47m"
|
63
|
+
e['default'] = "\033[0;39m"
|
64
|
+
e
|
65
|
+
end
|
66
|
+
end
|
data/lib/doing/colors.rb
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
# Cribbed from <https://github.com/flori/term-ansicolor>
|
2
|
+
module Doing
|
3
|
+
module Color
|
4
|
+
|
5
|
+
# :stopdoc:
|
6
|
+
ATTRIBUTES = [
|
7
|
+
[ :clear , 0 ], # String#clear is already used to empty string in Ruby 1.9
|
8
|
+
[ :reset , 0 ], # synonym for :clear
|
9
|
+
[ :bold , 1 ],
|
10
|
+
[ :dark , 2 ],
|
11
|
+
[ :italic , 3 ], # not widely implemented
|
12
|
+
[ :underline , 4 ],
|
13
|
+
[ :underscore , 4 ], # synonym for :underline
|
14
|
+
[ :blink , 5 ],
|
15
|
+
[ :rapid_blink , 6 ], # not widely implemented
|
16
|
+
[ :negative , 7 ], # no reverse because of String#reverse
|
17
|
+
[ :concealed , 8 ],
|
18
|
+
[ :strikethrough , 9 ], # not widely implemented
|
19
|
+
[ :black , 30 ],
|
20
|
+
[ :red , 31 ],
|
21
|
+
[ :green , 32 ],
|
22
|
+
[ :yellow , 33 ],
|
23
|
+
[ :blue , 34 ],
|
24
|
+
[ :magenta , 35 ],
|
25
|
+
[ :cyan , 36 ],
|
26
|
+
[ :white , 37 ],
|
27
|
+
[ :bgblack , 40 ],
|
28
|
+
[ :bgred , 41 ],
|
29
|
+
[ :bggreen , 42 ],
|
30
|
+
[ :bgyellow , 43 ],
|
31
|
+
[ :bgblue , 44 ],
|
32
|
+
[ :bgmagenta , 45 ],
|
33
|
+
[ :bgcyan , 46 ],
|
34
|
+
[ :bgwhite , 47 ],
|
35
|
+
[ :boldblack , 90 ], # High intensity, aixterm (works in OS X)
|
36
|
+
[ :boldred , 91 ],
|
37
|
+
[ :boldgreen , 92 ],
|
38
|
+
[ :boldyellow , 93 ],
|
39
|
+
[ :boldblue , 94 ],
|
40
|
+
[ :boldmagenta , 95 ],
|
41
|
+
[ :boldcyan , 96 ],
|
42
|
+
[ :boldwhite , 97 ],
|
43
|
+
[ :boldbgblack , 100 ], # High intensity background, aixterm (works in OS X)
|
44
|
+
[ :boldbgred , 101 ],
|
45
|
+
[ :boldbggreen , 102 ],
|
46
|
+
[ :boldbgyellow , 103 ],
|
47
|
+
[ :boldbgblue , 104 ],
|
48
|
+
[ :boldbgmagenta , 105 ],
|
49
|
+
[ :boldbgcyan , 106 ],
|
50
|
+
[ :boldbgwhite , 107 ],
|
51
|
+
[ :softpurple , '0;35;40'],
|
52
|
+
[ :hotpants , '7;34;40'],
|
53
|
+
[ :knightrider , '7;30;40'],
|
54
|
+
[ :flamingo , '7;31;47'],
|
55
|
+
[ :yeller , '1;37;43'],
|
56
|
+
[ :whiteboard , '1;30;47'],
|
57
|
+
[ :default , '0;39' ]
|
58
|
+
]
|
59
|
+
|
60
|
+
ATTRIBUTE_NAMES = ATTRIBUTES.transpose.first
|
61
|
+
# :startdoc:
|
62
|
+
|
63
|
+
# Returns true if Doing::Color supports the +feature+.
|
64
|
+
#
|
65
|
+
# The feature :clear, that is mixing the clear color attribute into String,
|
66
|
+
# is only supported on ruby implementations, that do *not* already
|
67
|
+
# implement the String#clear method. It's better to use the reset color
|
68
|
+
# attribute instead.
|
69
|
+
def support?(feature)
|
70
|
+
case feature
|
71
|
+
when :clear
|
72
|
+
!String.instance_methods(false).map(&:to_sym).include?(:clear)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
# Returns true, if the coloring function of this module
|
76
|
+
# is switched on, false otherwise.
|
77
|
+
def self.coloring?
|
78
|
+
@coloring
|
79
|
+
end
|
80
|
+
|
81
|
+
# Turns the coloring on or off globally, so you can easily do
|
82
|
+
# this for example:
|
83
|
+
# Doing::Color::coloring = STDOUT.isatty
|
84
|
+
def self.coloring=(val)
|
85
|
+
@coloring = val
|
86
|
+
end
|
87
|
+
self.coloring = true
|
88
|
+
|
89
|
+
ATTRIBUTES.each do |c, v|
|
90
|
+
eval <<-EOT
|
91
|
+
def #{c}(string = nil)
|
92
|
+
result = ''
|
93
|
+
result << "\e[#{v}m" if Doing::Color.coloring?
|
94
|
+
if block_given?
|
95
|
+
result << yield
|
96
|
+
elsif string.respond_to?(:to_str)
|
97
|
+
result << string.to_str
|
98
|
+
elsif respond_to?(:to_str)
|
99
|
+
result << to_str
|
100
|
+
else
|
101
|
+
return result #only switch on
|
102
|
+
end
|
103
|
+
result << "\e[0m" if Doing::Color.coloring?
|
104
|
+
result
|
105
|
+
end
|
106
|
+
EOT
|
107
|
+
end
|
108
|
+
|
109
|
+
# Regular expression that is used to scan for ANSI-sequences while
|
110
|
+
# uncoloring strings.
|
111
|
+
COLORED_REGEXP = /\e\[(?:(?:[349]|10)[0-7]|[0-9])?m/
|
112
|
+
|
113
|
+
# Returns an uncolored version of the string, that is all
|
114
|
+
# ANSI-sequences are stripped from the string.
|
115
|
+
def uncolor(string = nil) # :yields:
|
116
|
+
if block_given?
|
117
|
+
yield.to_str.gsub(COLORED_REGEXP, '')
|
118
|
+
elsif string.respond_to?(:to_str)
|
119
|
+
string.to_str.gsub(COLORED_REGEXP, '')
|
120
|
+
elsif respond_to?(:to_str)
|
121
|
+
to_str.gsub(COLORED_REGEXP, '')
|
122
|
+
else
|
123
|
+
''
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
module_function
|
128
|
+
|
129
|
+
# Returns an array of all Doing::Color attributes as symbols.
|
130
|
+
def attributes
|
131
|
+
ATTRIBUTE_NAMES
|
132
|
+
end
|
133
|
+
extend self
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|