aboutsummaryrefslogtreecommitdiffstats
path: root/c_exec.go
diff options
context:
space:
mode:
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)
}