diff options
author | joe <rbo@gmx.us> | 2025-08-29 10:38:04 +0200 |
---|---|---|
committer | joe <rbo@gmx.us> | 2025-08-29 10:38:04 +0200 |
commit | 96c3dac71f1a47549a10344da9092c00c553a4fe (patch) | |
tree | b0f8167edcc9b0f2391af3e7ddce010b3ed71bc3 /src | |
parent | wip (diff) | |
download | hardflip-96c3dac71f1a47549a10344da9092c00c553a4fe.tar.gz hardflip-96c3dac71f1a47549a10344da9092c00c553a4fe.tar.bz2 hardflip-96c3dac71f1a47549a10344da9092c00c553a4fe.tar.xz hardflip-96c3dac71f1a47549a10344da9092c00c553a4fe.tar.zst hardflip-96c3dac71f1a47549a10344da9092c00c553a4fe.zip |
search only mode
Diffstat (limited to '')
-rw-r--r-- | src/c_exec.go | 9 | ||||
-rw-r--r-- | src/c_hardflip.go | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/c_exec.go b/src/c_exec.go index e00fe36..ff0ed89 100644 --- a/src/c_exec.go +++ b/src/c_exec.go @@ -292,12 +292,13 @@ func c_exec(host *HostNode, opts HardOpts, ui *HardUI) { if host.Protocol == PROTOCOL_CMD { silent = host.Silent } - if silent == false { + if silent == false && ui != nil { if err := ui.s.Suspend(); err != nil { c_error_mode("screen", err, ui) return } - } else { + } else if ui != nil { + i_draw_msg(ui.s, 1, ui.style[BOX_STYLE], ui.dim, " Exec ") text := "running command..." left, right := i_left_right(len(text), *ui) @@ -306,13 +307,13 @@ func c_exec(host *HostNode, opts HardOpts, ui *HardUI) { ui.s.Show() } if err, err_str := c_exec_cmd(cmd_fmt, cmd_env, silent); - err != nil && host.Protocol == PROTOCOL_CMD { + err != nil && host.Protocol == PROTOCOL_CMD { c_error_mode(err_str, err, ui) } if opts.Loop == false { ui.s.Fini() os.Exit(0) - } else if silent == false { + } else if silent == false && ui != nil { c_resume_or_die(ui) } } diff --git a/src/c_hardflip.go b/src/c_hardflip.go index a50a9ae..0a203b4 100644 --- a/src/c_hardflip.go +++ b/src/c_hardflip.go @@ -82,7 +82,8 @@ func main() { data := c_init_hard(data_dir, n_arg, s_arg) if s_arg == true { c_fuzz(data, &data.ui) - // TODO: exec instantly here + c_exec(data.litems.curr.Host, data.opts, nil) + return } i_ui(data) } |