Skip to content

Commit

Permalink
feat: added a command to execute a previously entered command
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 6962c3abf17e43c8f8c92adf9ba4840cea15f89e712732e1df0d5b1bedfd9a3c
  • Loading branch information
thindil committed Nov 6, 2023
1 parent cfffe15 commit 193c1d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/nish.nim
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,10 @@ proc main() {.sideEffect, raises: [], tags: [ReadIOEffect, WriteIOEffect,
if returnCode != 130:
returnCode = QuitSuccess.ResultCode
continue
# User entered just the command to execute the previously entered command,
# replace it with the previous if exists
if inputString == "." and lastCommand.len > 0:
inputString.text = lastCommand
userInput = initOptParser(cmdLine = $inputString)
# Reset the return code of the program
returnCode = QuitSuccess.ResultCode
Expand Down

0 comments on commit 193c1d3

Please sign in to comment.