Skip to content

Commit

Permalink
refactor: made some procedures local, as they no longer needed to be …
Browse files Browse the repository at this point in the history
…public for tests

FossilOrigin-Name: 556cf58ec1f7b119e99f2c0a5e9df8b87515c0441e3b4b0015b1d8485dd05733
  • Loading branch information
thindil committed Jan 31, 2024
1 parent c2a23a2 commit ce2dafb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/history.nim
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ proc historyLength*(db): HistoryRange {.sideEffect, raises: [], tags: [
e = getCurrentException(), db = db)
return HistoryRange.low

proc newHistoryEntry*(command: string = ""; lastUsed: DateTime = now();
proc newHistoryEntry(command: string = ""; lastUsed: DateTime = now();
amount: Positive = 1; path: string = ""): HistoryEntry {.raises: [], tags: [],
contractual.} =
## Create a new data structure for the shell's commands' history entry.
Expand Down Expand Up @@ -216,7 +216,7 @@ proc getHistory*(historyIndex: HistoryRange; db;
e = getCurrentException(), db = db)
return $searchFor

proc clearHistory*(db): ResultCode {.sideEffect, raises: [], tags: [
proc clearHistory(db): ResultCode {.sideEffect, raises: [], tags: [
ReadIOEffect, WriteIOEffect, ReadDbEffect, WriteDbEffect, TimeEffect,
RootEffect], contractual.} =
## Clear the shell's history, don't add the command to the history
Expand All @@ -236,7 +236,7 @@ proc clearHistory*(db): ResultCode {.sideEffect, raises: [], tags: [
color = success, db = db)
return QuitSuccess.ResultCode

proc showHistory*(db; arguments): ResultCode {.sideEffect, raises: [],
proc showHistory(db; arguments): ResultCode {.sideEffect, raises: [],
tags: [ReadDbEffect, WriteDbEffect, ReadIOEffect, WriteIOEffect,
ReadEnvEffect, TimeEffect, RootEffect], contractual.} =
## Show the last X entries to the shell's history. X can be set in the shell's
Expand Down Expand Up @@ -325,7 +325,7 @@ proc showHistory*(db; arguments): ResultCode {.sideEffect, raises: [],
e = getCurrentException(), db = db)
return QuitSuccess.ResultCode

proc findInHistory*(db; arguments): ResultCode {.raises: [], tags: [
proc findInHistory(db; arguments): ResultCode {.raises: [], tags: [
ReadIOEffect, WriteIOEffect, ReadDbEffect, RootEffect], contractual.} =
## Find the selected term in the shell's commands' history
##
Expand Down

0 comments on commit ce2dafb

Please sign in to comment.