Allow searching without action.

This commit is contained in:
Dominik Pantůček 2023-04-04 19:39:42 +02:00
parent 2232786316
commit cc4cfccae1

View file

@ -94,7 +94,10 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
""
"Query options:"
(-mi (id) "Specify member by id" (-member-id- (string->number id)))
(-mn (nick) "Specify member by nick" (-member-nick- nick))
(-mn (nick) "Specify member by nick"
(when (not (-action-))
(-action- 'no-op))
(-member-nick- nick))
""
"Actions:"
(-info () "Print information"
@ -168,6 +171,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
((> (length mrs) 1)
(newline)
(print "Found: " (member-records->string mrs))
(-action- 'no-op)
#f)
(else
(car mrs))))
@ -235,6 +239,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
(if mr
(edit-file (member-file-path mr))
(print "No member to edit.")))
((no-op) (void))
(else
(print "Nothing to do."))