Skip to content

Commit

Permalink
docs: added code documentation to runCommand procedure
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 921f91f9cfb568a15281f73148a679ce0d4691c1612281a6f6d63befd6362a67
  • Loading branch information
thindil committed Dec 30, 2023
1 parent 9faf080 commit 042dc33
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/commandslist.nim
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,16 @@ proc replaceCommand*(name: UserInput; command: CommandProc;
proc runCommand*(commandName: string; arguments: UserInput; withShell: bool;
db: DbConn): ResultCode {.sideEffect, raises: [], tags: [WriteIOEffect,
ReadIOEffect, ExecIOEffect, RootEffect], contractual.} =
## Excecute the selected command with or witout using the system's default
## shell
##
## * commandName - the name of the command entered by the user
## * arguments - the arguments of the command entered by the user
## * withShell - if true, execute the command withing the system's default
## shell. Otherwise execute the command as a subprocess
## * db - the connection to the shell's database
##
## Returns the shell's code returned by the executed command
require:
commandName.len > 0
db != nil
Expand Down

0 comments on commit 042dc33

Please sign in to comment.