Skip to content

Commit

Permalink
fix: do not error out when pressing ctrl+c
Browse files Browse the repository at this point in the history
  • Loading branch information
Realiserad committed Jun 16, 2024
1 parent fd13102 commit 07f0222
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/fish_ai/switch_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def switch_context():
terminal_menu = TerminalMenu(options)
terminal_menu.title = 'Select context'
index = terminal_menu.show()
if index is None:
return
active_section = options[index].split(' ')[0]
config.set(section='fish-ai', option='configuration', value=active_section)
config.write(open(path.expanduser('~/.config/fish-ai.ini'), 'w'))
Expand Down

0 comments on commit 07f0222

Please sign in to comment.