Skip to content

Commit 945edea

Browse files
committed
Feature add
copies user_input into clipboard for when user accidentally enters history before commands
1 parent ccf0ad5 commit 945edea

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,14 @@ def main():
140140
pyperclip.copy(found_commands)
141141
old_note = old_note.replace('<br>', '\n').replace('&lt;', '<').replace('&gt;', '>')
142142
user_input = input(f'\n~~~PREVIOUS NOTE~~~\n{old_note}\n-{event["summary"]}- (⌘ + v to paste): ').split(',') if found_commands else input(command_prompt(event['summary'])).split(',')
143+
pyperclip.copy(user_input)
143144

144145
if user_input != ['']:
145146
try:
146147
event['description'] = parse_commands(user_input)
147148
except KeyError:
149+
# Add user_input into clipboard, parse that and execute parse_commands?
150+
148151
print('Key Error: add commands first')
149152
user_input = input(f'\n~~~PREVIOUS NOTE~~~\n{old_note}\n-{event["summary"]}- (⌘ + v to paste): ').split(',') if found_commands else input(command_prompt(event['summary'])).split(',')
150153
event['description'] = parse_commands(user_input)

0 commit comments

Comments
 (0)