Skip to content

Commit

Permalink
feat: use the shell's theme's colors in history list command
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 3fb96d20dff8b483e448fa0a03c026ae7b4f1eee94e96c8b4d30cda04c43b1c2
  • Loading branch information
thindil committed Dec 9, 2023
1 parent 8d51c5d commit 8dcc5dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/history.nim
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,9 @@ proc showHistory*(db; arguments): ResultCode {.sideEffect, raises: [],
return showError(message = "Unknown type of history sort order", db = db)
var table: TerminalTable = TerminalTable()
try:
table.add(parts = [magenta(ss = "Last used"), magenta(ss = "Times"),
magenta(ss = "Command")])
let color: string = getColor(db = db, name = tableHeaders)
table.add(parts = [style(ss = "Last used", style = color), style(
ss = "Times", style = color), style(ss = "Command", style = color)])
except UnknownEscapeError, InsufficientInputError, FinalByteError:
return showError(message = "Can't show history list. Reason: ",
e = getCurrentException(), db = db)
Expand Down

0 comments on commit 8dcc5dd

Please sign in to comment.