aboutsummaryrefslogtreecommitdiffstats
path: root/c_exec.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-18 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-01-18 20:20:20 +0100
commit0776a238c4c10a35b39160f37271bc8b5cd026b0 (patch)
tree6b4322126460d414ed7f113b47a1d2331abc8bf8 /c_exec.go
parentgood (diff)
downloadhardflip-0776a238c4c10a35b39160f37271bc8b5cd026b0.tar.gz
hardflip-0776a238c4c10a35b39160f37271bc8b5cd026b0.tar.bz2
hardflip-0776a238c4c10a35b39160f37271bc8b5cd026b0.tar.xz
hardflip-0776a238c4c10a35b39160f37271bc8b5cd026b0.tar.zst
hardflip-0776a238c4c10a35b39160f37271bc8b5cd026b0.zip
split
Diffstat (limited to '')
-rw-r--r--c_exec.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/c_exec.go b/c_exec.go
index 8b37976..da97346 100644
--- a/c_exec.go
+++ b/c_exec.go
@@ -135,7 +135,7 @@ func c_format_rdp(host *HostNode) []string {
return cmd_fmt
}
-func c_format_cmd(host *HostNode) {
+func c_format_cmd(host *HostNode, term string) {
var cmd_fmt []string
switch host.Protocol {
@@ -146,12 +146,15 @@ func c_format_cmd(host *HostNode) {
default:
c_die("type not found", nil)
}
+ if len(term) > 0 {
+ cmd_fmt = append([]string{term, "-e"}, cmd_fmt...)
+ }
c_exec_cmd(cmd_fmt)
}
-func c_exec(host *HostNode) {
+func c_exec(host *HostNode, term string) {
if host == nil {
return
}
- c_format_cmd(host)
+ c_format_cmd(host, term)
}