Skip to content

Commit

Permalink
ptig new exec flag to issue a comment as if enter interactively
Browse files Browse the repository at this point in the history
  • Loading branch information
clach04 committed Nov 9, 2024
1 parent 01f8edc commit a5f1ef5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions puren_tonbo/tools/ptig.py
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,7 @@ def main(argv=None):
parser.add_option("-c", "--codec", help="Override config file encoding (can be a list TODO format comma?)")
parser.add_option("--config-file", "--config_file", help="Override config file")
parser.add_option("--note-root", help="Directory of notes, or dir_name_or_filename1.... will pick up from config file and default to '.'")
parser.add_option("-e", "--exec", help="Command to issue after initialization (init config section - TODO decide one-off-and-exit, or enter command loop?)")
parser.add_option("-p", "--password", help="password, if omitted and OS env PT_PASSWORD is set use that, next checks keyring, if missing prompt")
parser.add_option("-P", "--password_file", help="file name where password is to be read from, trailing blanks are ignored")

Expand Down Expand Up @@ -1208,6 +1209,8 @@ def main(argv=None):
setattr(interpreter, 'do_' + editor, FakeMethodEdit(editor, interpreter))
for command in ptig_options.get('init', []):
interpreter.onecmd(command)
if options.exec:
interpreter.onecmd(options.exec)
interpreter.cmdloop()

return 0
Expand Down

0 comments on commit a5f1ef5

Please sign in to comment.