Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
0xrushi authored Oct 29, 2021
1 parent e7cf765 commit 758e349
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keep/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def list_commands(ctx):

commands = read_commands()
for i, (cmd, fields) in enumerate(commands.items()):
table_data.append([str(i+1), '$ ' + cmd, fields['desc'], fields['alias']])
table_data.append([str(i + 1), '$ ' + cmd, fields['desc'], fields['alias']])

table = AsciiTable(table_data)
max_width = table.table_width//3
Expand Down Expand Up @@ -215,7 +215,7 @@ def grep_commands(pattern):
for i, (cmd, fields) in enumerate(commands.items()):
desc = fields['desc']
alias = fields['alias']
if pattern.isdigit() and pattern == str(i+1):
if pattern.isdigit() and pattern == str(i + 1):
result.clear()
result.append((cmd, desc))
break
Expand Down

0 comments on commit 758e349

Please # to comment.