From 4490aeb3db6087298ded4c5ef985b61be360a607 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 16 May 2024 20:20:20 +0200 Subject: ok --- src/c_defs.go | 17 ++++++++++++++++- src/i_insert.go | 3 +-- src/i_ui.go | 2 -- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/c_defs.go b/src/c_defs.go index 9e7015e..a21fca8 100644 --- a/src/c_defs.go +++ b/src/c_defs.go @@ -66,7 +66,6 @@ m: mkdir - ?: help` ERROR_KEYS_HINTS = "[Enter]: ok" CONFIRM_KEYS_HINTS = `y/n: yes - no` - INSERT_KEYS_HINTS = `` HELP_KEYS_HINTS = `q: close - j: down - k: up` @@ -175,6 +174,7 @@ const ( INS_OS_VOLAPI INS_OS_NOTE INS_OS_OK + INS_MAX = INS_OS_OK ) const ( @@ -184,6 +184,21 @@ const ( INSERT_EDIT ) +var ( + INSERT_HINTS = [INS_MAX]string{ + "Select the protocol used to connect to your host", + "IP or domain name of your host", + "Port used for SSH (default: 22)", + "User used to log in (default: root)", + "Password for your user", + "SSH private key used to log in instead of a password", + "Optional shell command line that will be run on your host", + "IP or domain name of your jump host", + "Port used for your jump SSH host (default: 22)", + // TODO: fuck this anyway + } +) + var ( HELP_NORMAL_KEYS = [][2]string{ {" | j", "Go to next item"}, diff --git a/src/i_insert.go b/src/i_insert.go index 1202a64..3b16077 100644 --- a/src/i_insert.go +++ b/src/i_insert.go @@ -53,7 +53,6 @@ package main import ( "errors" - "log" "os" "path/filepath" "regexp" @@ -538,7 +537,7 @@ func i_draw_insert_ssh(ui *HardUI, line int, win Quad, } red = false if line += 2; win.T + line >= win.B { return line } - i_draw_text_box(ui, win.T + line, win, "Command (optional)", in.Exec, + i_draw_text_box(ui, win.T + line, win, "Command", in.Exec, INS_SSH_EXEC, false, false) if line += 2; win.T + line >= win.B { return line } text = "---- Jump settings ----" diff --git a/src/i_ui.go b/src/i_ui.go index 7447803..a27c602 100644 --- a/src/i_ui.go +++ b/src/i_ui.go @@ -229,8 +229,6 @@ func i_draw_bottom_text(ui HardUI, insert *HostNode, insert_err []error) { text = "" } else if insert_err != nil { text = ERROR_KEYS_HINTS - } else { - text = INSERT_KEYS_HINTS } case HELP_MODE: text = HELP_KEYS_HINTS -- cgit v1.2.3