From 042dc337ee54d63d7c13419ca4e49849cdb4ef05 Mon Sep 17 00:00:00 2001 From: thindil Date: Sat, 30 Dec 2023 05:39:29 +0000 Subject: [PATCH] docs: added code documentation to runCommand procedure FossilOrigin-Name: 921f91f9cfb568a15281f73148a679ce0d4691c1612281a6f6d63befd6362a67 --- src/commandslist.nim | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/commandslist.nim b/src/commandslist.nim index c0beb1c7..10667a1d 100644 --- a/src/commandslist.nim +++ b/src/commandslist.nim @@ -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