na 1.2.65 → 1.2.66
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 +8 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/na/next_action.rb +15 -0
- data/lib/na/todo.rb +1 -1
- data/lib/na/version.rb +1 -1
- data/src/_README.md +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e55a544aa2a32d81e208e30dc4e3c43cda1e6f91df7b27ee956a72fda328a575
|
|
4
|
+
data.tar.gz: 54f9bba1d550e62b6e2d509f2a3b69263b10049cea0f69b39cd304b6328ec7f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cfb11dacafe1d09ec339eb10b419c540fb42f45c0d4bf2492ddc23fabd7df4a7174268e4b9d054fa7b9c5c1e08bb22c6834b32b583ac874a8e2b28261bf7437e
|
|
7
|
+
data.tar.gz: 567acf2c48eb5e84ca4af54fe03aab6d6b4a1b6f74f446d0a723ce9e6ce2bf4f04c8ffa9e41ffbeba5f7e2ba23785a742db2c2dca656b783f40113fad9a03c74
|
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.66.
|
|
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
|
|
|
@@ -76,7 +76,7 @@ SYNOPSIS
|
|
|
76
76
|
na [global options] command [command options] [arguments...]
|
|
77
77
|
|
|
78
78
|
VERSION
|
|
79
|
-
1.2.
|
|
79
|
+
1.2.66
|
|
80
80
|
|
|
81
81
|
GLOBAL OPTIONS
|
|
82
82
|
-a, --add - Add a next action (deprecated, for backwards compatibility)
|
data/lib/na/next_action.rb
CHANGED
|
@@ -578,6 +578,9 @@ module NA
|
|
|
578
578
|
end
|
|
579
579
|
|
|
580
580
|
dirs = dirs.sort_by { |d| File.basename(d) }.uniq
|
|
581
|
+
|
|
582
|
+
dirs = find_exact_dir(dirs, search)
|
|
583
|
+
|
|
581
584
|
if dirs.empty? && require_last
|
|
582
585
|
NA.notify("#{NA.theme[:warning]}No matches, loosening search", debug: true)
|
|
583
586
|
match_working_dir(search, distance: 2, require_last: false)
|
|
@@ -587,6 +590,18 @@ module NA
|
|
|
587
590
|
end
|
|
588
591
|
end
|
|
589
592
|
|
|
593
|
+
def find_exact_dir(dirs, search)
|
|
594
|
+
terms = search.filter { |s| !s[:negate] }.map { |t| t[:token] }.join(' ')
|
|
595
|
+
out = dirs
|
|
596
|
+
dirs.each do |dir|
|
|
597
|
+
if File.basename(dir).sub(/\.#{NA.extension}$/, '') =~ /^#{terms}$/
|
|
598
|
+
out = [dir]
|
|
599
|
+
break
|
|
600
|
+
end
|
|
601
|
+
end
|
|
602
|
+
out
|
|
603
|
+
end
|
|
604
|
+
|
|
590
605
|
##
|
|
591
606
|
## Save a todo file path to the database
|
|
592
607
|
##
|
data/lib/na/todo.rb
CHANGED
|
@@ -94,7 +94,7 @@ module NA
|
|
|
94
94
|
else
|
|
95
95
|
NA.match_working_dir(settings[:query])
|
|
96
96
|
end
|
|
97
|
-
NA.notify("Files: #{files.join(', ')}", debug:true)
|
|
97
|
+
NA.notify("Files: #{files.join(', ')}", debug: true)
|
|
98
98
|
files.each do |file|
|
|
99
99
|
NA.save_working_dir(File.expand_path(file))
|
|
100
100
|
content = file.read_file
|
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.65<!--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
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: na
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.66
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brett Terpstra
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-06-
|
|
11
|
+
date: 2024-06-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|