namespace eval shellspy::parameters {
  proc cmdshellb {paramdict} {
    return [commonset params_cmdshellb $paramdict]
  }

  
  proc cmdshell {paramdict} {
    return [commonset params_cmdshell $paramdict]
  }

  proc powershell {paramdict} {
    return [commonset params_powershell $paramdict]
  }

  proc raw {paramdict} {
    return [commonset params_raw $paramdict]
  }

  proc wsl {paramdict} {
    return [commonset params_wsl $paramdict]
  }
  proc bash {paramdict} {
    return [commonset params_bash $paramdict]
  }

  proc sh {paramdict} {
    return [commonset params_sh $paramdict]
  }

  proc  commonset {logtag paramdict} {
    #timeout for launched process
    #dict set paramdict -timeout 60000
    dict set paramdict -timeout 5000
    #prefix for each stdout line - for debugging if this output being mixed with some other
    dict set paramdict -outprefix ""
    #prefix for each stderr line - also usually best left blank
    dict set paramdict -errprefix ""
    #put extra info to the log outputs (by default goes to syslog 127.0.0.1 514)
    dict set paramdict -debug 0
    dict set paramdict -outbuffering none
    dict set paramdict -inbuffering none
    #if at tail end of commandline there is a > or >> redirection to a file that contains 'temp'
    # make a '_copy' version  e.g for something/temp/blah.tmp 
    # create something/temp/blah_copy.tmp
    # this is for pipelines where some other process deletes the original temp file but you want a copy
    # to review/debug. 
    dict set paramdict -copytempfile 1

    shellfilter::log::write $logtag "base parameters: $paramdict"
    return $paramdict
  }
}