Skip to content

Commit

Permalink
Short circuit interactive mode if token is found
Browse files Browse the repository at this point in the history
  • Loading branch information
benprew committed Jun 5, 2024
1 parent 162f522 commit ebb3d26
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/reckon/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,14 @@ def print_transaction(rows, fh = $stdout)
end

def ask_account_question(msg, row)
# return account token if it matches
token_answer = most_specific_regexp_match(row)
if token_answer.any?
row[:note] = "Matched account token"
print_transaction([row])
return token_answer[0]
end

possible_answers = suggest(row)
LOGGER.info "possible_answers===> #{possible_answers.inspect}"

Expand Down

0 comments on commit ebb3d26

Please sign in to comment.