Skip to content

Commit

Permalink
fix: improved /help output
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Oct 27, 2023
1 parent 6c9e7fc commit 16dd27b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gptme/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ def handle_cmd(
log.undo(1, quiet=True)
log.write()

longest_cmd = max(len(cmd) for cmd in COMMANDS)
print("Available commands:")
for cmd, desc in action_descriptions.items():
print(f" {cmd}: {desc}")
cmd = cmd.ljust(longest_cmd)
print(f" /{cmd} {desc}")

0 comments on commit 16dd27b

Please sign in to comment.