na 1.2.9 → 1.2.10
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 +9 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/bin/na +1 -1
- data/lib/na/next_action.rb +4 -3
- data/lib/na/version.rb +1 -1
- data/src/README.md +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: 848e54e708d4cbd9f5ef710e25b5c0b877cde54f6dc7f85f9cf4f0ffefb6bb6b
|
4
|
+
data.tar.gz: 6ecc93bec183a94a12f1f6ac870647a9d89120df09f3e859bab812a9c5cd9327
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe0da137c601074516d58dc7add5dfc6dc5cabef2decd7e61ac0af59bd63b4c5effe306654e0fd18e434bd57af454242c5f3db6256f6c7c5f834274f1ef2b533
|
7
|
+
data.tar.gz: 183cfecfdeeddad0105b27fda2dd826bbe4172a6b22c7e40ece42d9a86fd18fc95d7e35c34bd07fecc64c920562857d279fa7c42926fec432e2ef8312c5678fb
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
_If you're one of the rare people like me who find this useful, feel free to
|
10
10
|
[buy me some coffee][donate]._
|
11
11
|
|
12
|
-
The current version of `na` is 1.2.
|
12
|
+
The current version of `na` is 1.2.10
|
13
13
|
.
|
14
14
|
|
15
15
|
`na` ("next action") is a command line tool designed to make it easy to see what your next actions are for any project, right from the command line. It works with TaskPaper-formatted files (but any plain text format will do), looking for `@na` tags (or whatever you specify) in todo files in your current folder.
|
@@ -77,7 +77,7 @@ SYNOPSIS
|
|
77
77
|
na [global options] command [command options] [arguments...]
|
78
78
|
|
79
79
|
VERSION
|
80
|
-
1.2.
|
80
|
+
1.2.10
|
81
81
|
|
82
82
|
GLOBAL OPTIONS
|
83
83
|
-a, --[no-]add - Add a next action (deprecated, for backwards compatibility)
|
data/bin/na
CHANGED
@@ -127,7 +127,7 @@ class App
|
|
127
127
|
m = a.match(/^(?<req>[+\-!])?(?<tok>.*?)$/)
|
128
128
|
tokens.push({
|
129
129
|
token: m['tok'],
|
130
|
-
required:
|
130
|
+
required: !m['req'].nil? && m['req'] == '+',
|
131
131
|
negate: !m['req'].nil? && m['req'] =~ /[!\-]/
|
132
132
|
})
|
133
133
|
end
|
data/lib/na/next_action.rb
CHANGED
@@ -291,6 +291,7 @@ module NA
|
|
291
291
|
projects.select { |proj| proj.project =~ /^#{action.parent.join(':')}$/ }.first
|
292
292
|
end
|
293
293
|
|
294
|
+
NA.notify("{r}Error parsing project #{target_proj}", exit_code: 1) if target_proj.nil?
|
294
295
|
|
295
296
|
indent = "\t" * target_proj.indent
|
296
297
|
note = note.split("\n") unless note.is_a?(Array)
|
@@ -759,12 +760,12 @@ module NA
|
|
759
760
|
|
760
761
|
dirs = file.read_file.split("\n")
|
761
762
|
|
762
|
-
optional = search.map { |t| t[:token] }
|
763
|
+
optional = search.filter { |s| !s[:negate] }.map { |t| t[:token] }
|
763
764
|
required = search.filter { |s| s[:required] }.map { |t| t[:token] }
|
764
765
|
negated = search.filter { |s| s[:negate] }.map { |t| t[:token] }
|
765
766
|
|
766
|
-
optional.push('*') if required.count.zero? && negated.count.positive?
|
767
|
-
if
|
767
|
+
optional.push('*') if optional.count.zero? && required.count.zero? && negated.count.positive?
|
768
|
+
if optional == negated
|
768
769
|
required = ['*']
|
769
770
|
optional = ['*']
|
770
771
|
end
|
data/lib/na/version.rb
CHANGED
data/src/README.md
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
_If you're one of the rare people like me who find this useful, feel free to
|
10
10
|
[buy me some coffee][donate]._
|
11
11
|
|
12
|
-
The current version of `na` is <!--VER-->1.2.
|
12
|
+
The current version of `na` is <!--VER-->1.2.9<!--END VER-->.
|
13
13
|
|
14
14
|
`na` ("next action") is a command line tool designed to make it easy to see what your next actions are for any project, right from the command line. It works with TaskPaper-formatted files (but any plain text format will do), looking for `@na` tags (or whatever you specify) in todo files in your current folder.
|
15
15
|
|